package executor

import "github.com/moby/buildkit/executor"

Index

Functions

func MountStubsCleaner

func MountStubsCleaner(dir string, mounts []Mount, recursive bool) func()

Types

type Executor

type Executor interface {
	// Run will start a container for the given process with rootfs, mounts.
	// `id` is an optional name for the container so it can be referenced later via Exec.
	// `started` is an optional channel that will be closed when the container setup completes and has started running.
	Run(ctx context.Context, id string, rootfs Mount, mounts []Mount, process ProcessInfo, started chan<- struct{}) error
	// Exec will start a process in container matching `id`. An error will be returned
	// if the container failed to start (via Run) or has exited before Exec is called.
	Exec(ctx context.Context, id string, process ProcessInfo) error
}

type HostIP

type HostIP struct {
	Host string
	IP   net.IP
}

type Meta

type Meta struct {
	Args           []string
	Env            []string
	User           string
	Cwd            string
	Hostname       string
	Tty            bool
	ReadonlyRootFS bool
	ExtraHosts     []HostIP
	Ulimit         []*pb.Ulimit
	CgroupParent   string
	NetMode        pb.NetMode
	SecurityMode   pb.SecurityMode

	RemoveMountStubsRecursive bool
}

type Mount

type Mount struct {
	Src      Mountable
	Selector string
	Dest     string
	Readonly bool
}

type Mountable

type Mountable interface {
	Mount(ctx context.Context, readonly bool) (snapshot.Mountable, error)
}

type ProcessInfo

type ProcessInfo struct {
	Meta           Meta
	Stdin          io.ReadCloser
	Stdout, Stderr io.WriteCloser
	Resize         <-chan WinSize
	Signal         <-chan syscall.Signal
}

type WinSize

type WinSize struct {
	Rows uint32
	Cols uint32
}

Source Files

executor.go stubs.go

Directories

PathSynopsis
executor/containerdexecutor
executor/oci
executor/runcexecutor
Version
v0.11.0-rc3
Published
Dec 16, 2022
Platform
js/wasm
Imports
12 packages
Last checked
1 minute ago

Tools for package owners.