Documentation
¶
Index ¶
- Constants
- func MakeClient(ctx context.Context, config coretypes.Config, nodename, endpoint string) (engine.API, error)
- type Engine
- func (e *Engine) BuildContent(ctx context.Context, scm coresource.Source, ...) (string, io.Reader, error)
- func (e *Engine) BuildRefs(_ context.Context, opts *enginetypes.BuildRefOptions) []string
- func (e *Engine) CloseConn() error
- func (e *Engine) ExecExitCode(_ context.Context, _, execID string) (int, error)
- func (e *Engine) ExecResize(_ context.Context, execID string, height, width uint) error
- func (e *Engine) Execute(ctx context.Context, ID string, config *enginetypes.ExecConfig) (execID string, stdout, stderr io.ReadCloser, stdin io.WriteCloser, err error)
- func (e *Engine) GetParams() *enginetypes.Params
- func (e *Engine) ImageBuild(ctx context.Context, input io.Reader, refs []string, platform string) (io.ReadCloser, error)
- func (e *Engine) ImageBuildCachePrune(ctx context.Context, all bool) (uint64, error)
- func (e *Engine) ImageBuildFromExist(ctx context.Context, ID string, refs []string, _ string) (string, error)
- func (e *Engine) ImageList(ctx context.Context, image string) ([]*enginetypes.Image, error)
- func (e *Engine) ImageLocalDigests(ctx context.Context, image string) ([]string, error)
- func (e *Engine) ImagePull(ctx context.Context, ref string, _ bool) (io.ReadCloser, error)
- func (e *Engine) ImagePush(ctx context.Context, ref string) (io.ReadCloser, error)
- func (e *Engine) ImageRemoteDigest(ctx context.Context, image string) (string, error)
- func (e *Engine) ImageRemove(ctx context.Context, image string, _, _ bool) ([]string, error)
- func (e *Engine) ImagesPrune(ctx context.Context) error
- func (e *Engine) Info(ctx context.Context) (*enginetypes.Info, error)
- func (e *Engine) NetworkConnect(context.Context, string, string, string, string) ([]string, error)
- func (e *Engine) NetworkDisconnect(context.Context, string, string, bool) error
- func (e *Engine) NetworkList(ctx context.Context, drivers []string) ([]*enginetypes.Network, error)
- func (e *Engine) Ping(ctx context.Context) error
- func (e *Engine) RawEngine(context.Context, *enginetypes.RawEngineOptions) (*enginetypes.RawEngineResult, error)
- func (e *Engine) VerifyNode(ctx context.Context) error
- func (e *Engine) VirtualizationAttach(ctx context.Context, ID string, _, stdin bool) (io.ReadCloser, io.ReadCloser, io.WriteCloser, error)
- func (e *Engine) VirtualizationCopyChunkTo(ctx context.Context, ID, target string, size int64, content io.Reader, ...) error
- func (e *Engine) VirtualizationCopyFrom(ctx context.Context, ID, path string) (content []byte, uid, gid int, mode int64, err error)
- func (e *Engine) VirtualizationCreate(ctx context.Context, opts *enginetypes.VirtualizationCreateOptions) (*enginetypes.VirtualizationCreated, error)
- func (e *Engine) VirtualizationInspect(ctx context.Context, ID string) (*enginetypes.VirtualizationInfo, error)
- func (e *Engine) VirtualizationLogs(ctx context.Context, opts *enginetypes.VirtualizationLogStreamOptions) (stdout, stderr io.ReadCloser, err error)
- func (e *Engine) VirtualizationRemove(ctx context.Context, ID string, _, force bool) error
- func (e *Engine) VirtualizationResize(context.Context, string, uint, uint) error
- func (e *Engine) VirtualizationResume(ctx context.Context, ID string) error
- func (e *Engine) VirtualizationStart(ctx context.Context, ID string) (err error)
- func (e *Engine) VirtualizationStop(ctx context.Context, ID string, gracefulTimeout time.Duration) (err error)
- func (e *Engine) VirtualizationSuspend(ctx context.Context, ID string) error
- func (e *Engine) VirtualizationUpdateResource(ctx context.Context, ID string, engineParams resourcetypes.Resources) error
- func (e *Engine) VirtualizationWait(ctx context.Context, ID, _ string) (*enginetypes.VirtualizationWaitResult, error)
- type RawArgs
Constants ¶
const ( // Prefix is the node endpoint scheme this engine serves. Prefix = "containerd://" Type = "containerd" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine runs containers through a node's own containerd socket, forwarded over SSH.
func (*Engine) BuildContent ¶
func (e *Engine) BuildContent(ctx context.Context, scm coresource.Source, opts *enginetypes.BuildContentOptions) (string, io.Reader, error)
BuildContent renders the build spec into a Dockerfile and tars the context around it.
func (*Engine) BuildRefs ¶
func (e *Engine) BuildRefs(_ context.Context, opts *enginetypes.BuildRefOptions) []string
func (*Engine) ExecExitCode ¶
func (*Engine) ExecResize ¶
func (*Engine) Execute ¶
func (e *Engine) Execute(ctx context.Context, ID string, config *enginetypes.ExecConfig) (execID string, stdout, stderr io.ReadCloser, stdin io.WriteCloser, err error)
func (*Engine) GetParams ¶
func (e *Engine) GetParams() *enginetypes.Params
func (*Engine) ImageBuild ¶
func (e *Engine) ImageBuild(ctx context.Context, input io.Reader, refs []string, platform string) (io.ReadCloser, error)
ImageBuild solves the context on the node's buildkitd and exports straight to the registry.
func (*Engine) ImageBuildCachePrune ¶
func (*Engine) ImageBuildFromExist ¶
func (e *Engine) ImageBuildFromExist(ctx context.Context, ID string, refs []string, _ string) (string, error)
ImageBuildFromExist captures the workload's writable snapshot as one more layer on its image.
func (*Engine) ImageLocalDigests ¶
func (*Engine) ImagePush ¶
ImagePush has nothing to send after a solve: BuildKit's exporter already pushed the image.
func (*Engine) ImageRemoteDigest ¶
func (*Engine) ImageRemove ¶
func (*Engine) ImagesPrune ¶
ImagesPrune drops every image no container is built on; containerd collects the blobs itself.
func (*Engine) NetworkConnect ¶
NetworkConnect is not a CNI operation: a network is attached when the netns is created.
func (*Engine) NetworkDisconnect ¶
func (*Engine) NetworkList ¶
func (*Engine) RawEngine ¶
func (e *Engine) RawEngine(context.Context, *enginetypes.RawEngineOptions) (*enginetypes.RawEngineResult, error)
func (*Engine) VirtualizationAttach ¶
func (e *Engine) VirtualizationAttach(ctx context.Context, ID string, _, stdin bool) (io.ReadCloser, io.ReadCloser, io.WriteCloser, error)
VirtualizationAttach without stdin is the journald follow; with stdin it is the fifo relays.
func (*Engine) VirtualizationCopyChunkTo ¶
func (*Engine) VirtualizationCopyFrom ¶
func (*Engine) VirtualizationCreate ¶
func (e *Engine) VirtualizationCreate(ctx context.Context, opts *enginetypes.VirtualizationCreateOptions) (*enginetypes.VirtualizationCreated, error)
func (*Engine) VirtualizationInspect ¶
func (e *Engine) VirtualizationInspect(ctx context.Context, ID string) (*enginetypes.VirtualizationInfo, error)
func (*Engine) VirtualizationLogs ¶
func (e *Engine) VirtualizationLogs(ctx context.Context, opts *enginetypes.VirtualizationLogStreamOptions) (stdout, stderr io.ReadCloser, err error)
func (*Engine) VirtualizationRemove ¶
func (*Engine) VirtualizationResize ¶
VirtualizationResize has nothing to resize: a workload's stdio is a pipe, never a terminal.
func (*Engine) VirtualizationResume ¶
func (*Engine) VirtualizationStart ¶
func (*Engine) VirtualizationStop ¶
func (*Engine) VirtualizationSuspend ¶
func (*Engine) VirtualizationUpdateResource ¶
func (*Engine) VirtualizationWait ¶
func (e *Engine) VirtualizationWait(ctx context.Context, ID, _ string) (*enginetypes.VirtualizationWaitResult, error)
type RawArgs ¶
type RawArgs struct {
CapAdd []string `json:"cap_add"`
CapDrop []string `json:"cap_drop"`
Devices []string `json:"devices"` // host[:container[:perms]]
Ulimits []*units.Ulimit `json:"ulimits"`
Runtime string `json:"runtime"`
PidsMax int64 `json:"pids_max"` // cgroup v2 pids.max
}
RawArgs carries containerd-specific workload options through core untouched.