package libcontainerd
import "github.com/dotcloud/docker/libcontainerd"
Index ¶
- Constants
- type Backend
- type Client
- type CreateOption
- type IOPipe
- type Remote
- type RemoteOption
- type StateInfo
Constants ¶
const ( StateStart = "start-container" StatePause = "pause" StateResume = "resume" StateExit = "exit" StateRestart = "restart" StateRestore = "restore" StateStartProcess = "start-process" StateExitProcess = "exit-process" StateOOM = "oom" // fake state )
State constants used in state change reporting.
const ( // InitFriendlyName is the name given in the lookup map of processes // for the first process started in a container. InitFriendlyName = "init" )
Types ¶
type Backend ¶
type Backend interface { StateChanged(containerID string, state StateInfo) error AttachStreams(processFriendlyName string, io IOPipe) error }
Backend defines callbacks that the client of the library needs to implement.
type Client ¶
type Client interface { Create(containerID string, spec Spec, options ...CreateOption) error Signal(containerID string, sig int) error AddProcess(containerID, processFriendlyName string, process Process) error Resize(containerID, processFriendlyName string, width, height int) error Pause(containerID string) error Resume(containerID string) error Restore(containerID string, options ...CreateOption) error Stats(containerID string) (*Stats, error) GetPidsForContainer(containerID string) ([]int, error) Summary(containerID string) ([]Summary, error) UpdateResources(containerID string, resources Resources) error }
Client provides access to containerd features.
type CreateOption ¶
type CreateOption interface { Apply(interface{}) error }
CreateOption allows to configure parameters of container creation.
func WithRestartManager ¶
func WithRestartManager(rm restartmanager.RestartManager) CreateOption
WithRestartManager sets the restartmanager to be used with the container.
type IOPipe ¶
type IOPipe struct { Stdin io.WriteCloser Stdout io.Reader Stderr io.Reader 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() }
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 paramters of remotes. This is unused on Windows.
type StateInfo ¶
type StateInfo struct { State string Pid uint32 ExitCode uint32 ProcessID string OOMKilled bool // TODO Windows containerd factor out }
StateInfo contains description about the new state container has entered.
Source Files ¶
client.go container.go process.go remote.go types.go
Directories ¶
Path | Synopsis |
---|---|
libcontainerd/windowsoci |
- Version
- v1.11.1
- Published
- Apr 26, 2016
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- now –
Tools for package owners.