Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateStart = "start-container" StatePause = "pause" StateResume = "resume" StateExit = "exit" StateRestore = "restore" StateExitProcess = "exit-process" StateOOM = "oom" // fake state )
State constants used in state change reporting.
View Source
const ( // InitFriendlyName is the name given in the lookup map of processes // for the first process started in a container. InitFriendlyName = "init" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetServerVersion(ctx context.Context) (*ServerVersion, error) Create(containerID string, checkpoint string, checkpointDir string, spec specs.Spec, attachStdio StdioCallback, options ...CreateOption) error Signal(containerID string, sig int) error SignalProcess(containerID string, processFriendlyName string, sig int) error AddProcess(ctx context.Context, containerID, processFriendlyName string, process Process, attachStdio StdioCallback) (int, error) Resize(containerID, processFriendlyName string, width, height int) error Pause(containerID string) error Resume(containerID string) error Restore(containerID string, attachStdio StdioCallback, options ...CreateOption) error Stats(containerID string) (*Stats, error) GetPidsForContainer(containerID string) ([]int, error) Summary(containerID string) ([]Summary, error) UpdateResources(containerID string, resources Resources) error CreateCheckpoint(containerID string, checkpointID string, checkpointDir string, exit bool) error DeleteCheckpoint(containerID string, checkpointID string, checkpointDir string) error ListCheckpoints(containerID string, checkpointDir string) (*Checkpoints, error) }
Client provides access to containerd features.
type CommonStateInfo ¶ added in v1.12.0
CommonStateInfo contains the state info common to all platforms.
type CreateOption ¶
type CreateOption interface {
Apply(interface{}) error
}
CreateOption allows to configure parameters of container creation.
type IOPipe ¶
type IOPipe struct { Stdin io.WriteCloser Stdout io.ReadCloser Stderr io.ReadCloser Terminal bool // Whether stderr is connected on Windows }
IOPipe contains the stdio streams.
type Remote ¶
type Remote interface { // Client returns a new Client instance connected with given Backend. Client(Backend) (Client, error) // Cleanup stops containerd if it was started by libcontainerd. // Note this is not used on Windows as there is no remote containerd. Cleanup() // UpdateOptions allows various remote options to be updated at runtime. UpdateOptions(...RemoteOption) error }
Remote on Linux defines the accesspoint to the containerd grpc API. Remote on Windows is largely an unimplemented interface as there is no remote containerd.
type RemoteOption ¶
RemoteOption allows to configure parameters of remotes. This is unused on Windows.
type ServerVersion ¶ added in v1.13.0
type ServerVersion struct {
containerd.GetServerVersionResponse
}
ServerVersion contains version information as retrieved from the server
type StdioCallback ¶ added in v1.12.4
StdioCallback is called to connect a container or process stdio.
Click to show internal directories.
Click to hide internal directories.