Help us shape the future of Go! Take the 2026 Go Developer Survey

containerd

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 65 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prefix is the node endpoint scheme this engine serves.
	Prefix = "containerd://"
	Type   = "containerd"
)

Variables

This section is empty.

Functions

func MakeClient

func MakeClient(ctx context.Context, config coretypes.Config, nodename, endpoint string) (engine.API, error)

MakeClient builds a containerd engine for endpoint.

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

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) CloseConn

func (e *Engine) CloseConn() error

func (*Engine) ExecExitCode

func (e *Engine) ExecExitCode(_ context.Context, _, execID string) (int, error)

func (*Engine) ExecResize

func (e *Engine) ExecResize(_ context.Context, execID string, height, width uint) error

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, err error)

ImageBuild solves the context on the node's buildkitd and exports straight to the registry.

func (*Engine) ImageBuildCachePrune

func (e *Engine) ImageBuildCachePrune(ctx context.Context, all bool) (uint64, error)

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) ImageList

func (e *Engine) ImageList(ctx context.Context, image string) ([]*enginetypes.Image, error)

func (*Engine) ImageLocalDigests

func (e *Engine) ImageLocalDigests(ctx context.Context, image string) ([]string, error)

func (*Engine) ImagePull

func (e *Engine) ImagePull(ctx context.Context, ref string, _ bool) (io.ReadCloser, error)

func (*Engine) ImagePush

func (e *Engine) ImagePush(ctx context.Context, ref string) (io.ReadCloser, error)

ImagePush has nothing to send after a solve: BuildKit's exporter already pushed the image.

func (*Engine) ImageRemoteDigest

func (e *Engine) ImageRemoteDigest(ctx context.Context, image string) (string, error)

func (*Engine) ImageRemove

func (e *Engine) ImageRemove(ctx context.Context, image string, _, _ bool) ([]string, error)

func (*Engine) ImagesPrune

func (e *Engine) ImagesPrune(ctx context.Context) error

ImagesPrune drops every image no container is built on; containerd collects the blobs itself.

func (*Engine) Info

func (e *Engine) Info(ctx context.Context) (*enginetypes.Info, error)

func (*Engine) NetworkConnect

func (e *Engine) NetworkConnect(context.Context, string, string, string, string) ([]string, error)

NetworkConnect is not a CNI operation: a network is attached when the netns is created.

func (*Engine) NetworkDisconnect

func (e *Engine) NetworkDisconnect(context.Context, string, string, bool) error

func (*Engine) NetworkList

func (e *Engine) NetworkList(ctx context.Context, drivers []string) ([]*enginetypes.Network, error)

func (*Engine) Ping

func (e *Engine) Ping(ctx context.Context) error

func (*Engine) VerifyNode

func (e *Engine) VerifyNode(ctx context.Context) 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 (e *Engine) VirtualizationCopyChunkTo(ctx context.Context, ID, target string, size int64, content io.Reader, uid, gid int, mode int64) error

func (*Engine) VirtualizationCopyFrom

func (e *Engine) VirtualizationCopyFrom(ctx context.Context, ID, path string) (content []byte, uid, gid int, mode int64, err 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 (e *Engine) VirtualizationRemove(ctx context.Context, ID string, _, force bool) error

func (*Engine) VirtualizationResize

func (e *Engine) VirtualizationResize(context.Context, string, uint, uint) error

VirtualizationResize has nothing to resize: a workload's stdio is a pipe, never a terminal.

func (*Engine) VirtualizationResume

func (e *Engine) VirtualizationResume(ctx context.Context, ID string) error

func (*Engine) VirtualizationStart

func (e *Engine) VirtualizationStart(ctx context.Context, ID string) (err error)

func (*Engine) VirtualizationStop

func (e *Engine) VirtualizationStop(ctx context.Context, ID string, gracefulTimeout time.Duration) (err error)

func (*Engine) VirtualizationSuspend

func (e *Engine) VirtualizationSuspend(ctx context.Context, ID string) error

func (*Engine) VirtualizationUpdateResource

func (e *Engine) VirtualizationUpdateResource(ctx context.Context, ID string, engineParams resourcetypes.Resources) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL