mirror of
https://github.com/moby/buildkit.git
synced 2026-07-03 21:27:40 +00:00
- [X] put multiples workers in a single binary ("-tags containerd standalone")
- [X] add worker selector to LLB vertex metadata
- [X] s/worker/executor/g
- [X] introduce the new "worker" concept https://github.com/moby/buildkit/pull/176#discussion_r153693928
- [X] fix up CLI
- [X] fix up tests
- allow using multiples workers (requires inter-vertex cache copier, HUGE!) --> will be separate PR
Implementation notes:
- "Workers" are renamed to "executors" now
- The new "worker" instance holds an "executor" instance and its
related stuffs such as the snapshotter
- The default worker is "runc-overlay"
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
30 lines
502 B
Go
30 lines
502 B
Go
package executor
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/moby/buildkit/cache"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
type Meta struct {
|
|
Args []string
|
|
Env []string
|
|
User string
|
|
Cwd string
|
|
Tty bool
|
|
// DisableNetworking bool
|
|
}
|
|
|
|
type Mount struct {
|
|
Src cache.Mountable
|
|
Selector string
|
|
Dest string
|
|
Readonly bool
|
|
}
|
|
|
|
type Executor interface {
|
|
// TODO: add stdout/err
|
|
Exec(ctx context.Context, meta Meta, rootfs cache.Mountable, mounts []Mount, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error
|
|
}
|