mirror of
https://github.com/moby/buildkit.git
synced 2026-07-01 04:07:10 +00:00
update run/exec tests for stdin and expected failures move common tests for runc and container to shared tests package Signed-off-by: Cory Bennett <cbennett@netflix.com>
46 lines
852 B
Go
46 lines
852 B
Go
package executor
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"net"
|
|
|
|
"github.com/moby/buildkit/cache"
|
|
"github.com/moby/buildkit/solver/pb"
|
|
)
|
|
|
|
type Meta struct {
|
|
Args []string
|
|
Env []string
|
|
User string
|
|
Cwd string
|
|
Tty bool
|
|
ReadonlyRootFS bool
|
|
ExtraHosts []HostIP
|
|
NetMode pb.NetMode
|
|
SecurityMode pb.SecurityMode
|
|
}
|
|
|
|
type Mount struct {
|
|
Src cache.Mountable
|
|
Selector string
|
|
Dest string
|
|
Readonly bool
|
|
}
|
|
|
|
type ProcessInfo struct {
|
|
Meta Meta
|
|
Stdin io.ReadCloser
|
|
Stdout, Stderr io.WriteCloser
|
|
}
|
|
|
|
type Executor interface {
|
|
Run(ctx context.Context, id string, rootfs cache.Mountable, mounts []Mount, process ProcessInfo, started chan<- struct{}) error
|
|
Exec(ctx context.Context, id string, process ProcessInfo) error
|
|
}
|
|
|
|
type HostIP struct {
|
|
Host string
|
|
IP net.IP
|
|
}
|