2017-06-01 22:24:23 +00:00
|
|
|
package worker
|
|
|
|
|
|
|
|
import (
|
2017-06-02 00:30:02 +00:00
|
|
|
"io"
|
|
|
|
|
2017-06-01 22:24:23 +00:00
|
|
|
"github.com/tonistiigi/buildkit_poc/cache"
|
|
|
|
"golang.org/x/net/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Meta struct {
|
|
|
|
Args []string
|
|
|
|
Env []string
|
|
|
|
User string
|
|
|
|
Cwd string
|
|
|
|
Tty bool
|
|
|
|
// DisableNetworking bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type Worker interface {
|
|
|
|
// TODO: add stdout/err
|
2017-06-02 00:30:02 +00:00
|
|
|
Exec(ctx context.Context, meta Meta, mounts map[string]cache.Mountable, stdout, stderr io.WriteCloser) error
|
2017-06-01 22:24:23 +00:00
|
|
|
}
|