types
packageThis package is not in the latest version of its module.
Details
Valid go.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeClient¶
type Client interface {Version(ctxcontext.Context) (containerd.Version,error)// LoadContainer loads the metadata for a container from containerd.LoadContainer(ctxcontext.Context, containerIDstring) (Container,error)// NewContainer creates a new containerd container.NewContainer(ctxcontext.Context, containerIDstring, spec *specs.Spec, shimstring, runtimeOptions interface{}, opts ...containerd.NewContainerOpts) (Container,error)}Client provides access to containerd features.
typeContainer¶
type Container interface {NewTask(ctxcontext.Context, checkpointDirstring, withStdinbool, attachStdioStdioCallback) (Task,error)Task(ctxcontext.Context) (Task,error)// AttachTask returns the current task for the container and reattaches// to the IO for the running task. If no task exists for the container// a NotFound error is returned.//// Clients must make sure that only one reader is attached to the task.AttachTask(ctxcontext.Context, attachStdioStdioCallback) (Task,error)// Delete removes the container and associated resourcesDelete(context.Context)error}Container provides access to a containerd container.
typeEventInfo¶
type EventInfo struct {ContainerIDstringProcessIDstringPiduint32ExitCodeuint32ExitedAttime.TimeErrorerror}EventInfo contains the event info
typeEventType¶
type EventTypestring
EventType represents a possible event from libcontainerd
const (EventUnknownEventType = "unknown"EventExitEventType = "exit"EventOOMEventType = "oom"EventCreateEventType = "create"EventStartEventType = "start"EventExecAddedEventType = "exec-added"EventExecStartedEventType = "exec-started"EventPausedEventType = "paused"EventResumedEventType = "resumed")
Event constants used when reporting events
typeProcess¶
type Process interface {// Pid is the system specific process idPid()uint32// Kill sends the provided signal to the processKill(ctxcontext.Context, signalsyscall.Signal)error// Resize changes the width and height of the process's terminalResize(ctxcontext.Context, width, heightuint32)error// Delete removes the process and any resources allocated returning the exit statusDelete(context.Context) (*containerd.ExitStatus,error)}Process of a container
typeResources¶
type Resources = specs.LinuxResources
Resources defines updatable container resource values. TODO: it must match containerd upcoming API
typeStats¶
type Stats struct {Readtime.Time// Metrics is expected to be either one of:// * github.com/containerd/cgroups/v3/cgroup1/stats.Metrics// * github.com/containerd/cgroups/v3/cgroup2/stats.MetricsMetrics interface{}}Stats holds metrics properties as returned by containerd
funcInterfaceToStats¶
InterfaceToStats returns a stats object from the platform-specific interface.
typeStdioCallback¶
StdioCallback is called to connect a container or process stdio.
typeTask¶
type Task interface {Process// Start begins execution of the taskStart(context.Context)error// Pause suspends the execution of the taskPause(context.Context)error// Resume the execution of the taskResume(context.Context)errorStats(ctxcontext.Context) (*Stats,error)// Pids returns a list of system specific process ids inside the taskPids(context.Context) ([]containerd.ProcessInfo,error)Summary(ctxcontext.Context) ([]Summary,error)// ForceDelete forcefully kills the task's processes and deletes the taskForceDelete(context.Context)error// Status returns the executing status of the taskStatus(ctxcontext.Context) (containerd.Status,error)// Exec creates and starts a new process inside the taskExec(ctxcontext.Context, processIDstring, spec *specs.Process, withStdinbool, attachStdioStdioCallback) (Process,error)UpdateResources(ctxcontext.Context, resources *Resources)errorCreateCheckpoint(ctxcontext.Context, checkpointDirstring, exitbool)error}Task provides access to a running containerd container.