package libcontainerd
import "github.com/dotcloud/docker/libcontainerd"
Index ¶
- Constants
- type Backend
- type Client
- type CommonStateInfo
- type CreateOption
- type IOPipe
- type Process
- type Remote
- type RemoteOption
- type Resources
- type ServicingOption
- type Spec
- type StateInfo
- type Stats
- type StdioCallback
- type Summary
- type User
Constants ¶
const ( CoEClassstring = syscall.Errno(0x800401F3) // Invalid class string ErrorNoNetwork = syscall.Errno(1222) // The network is not present or not started ErrorBadPathname = syscall.Errno(161) // The specified path is invalid ErrorInvalidObject = syscall.Errno(0x800710D8) // The object identifier does not represent a valid object )
Win32 error codes that are used for various workarounds These really should be ALL_CAPS to match golangs syscall library and standard Win32 error conventions, but golint insists on CamelCase.
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 ¶
Backend defines callbacks that the client of the library needs to implement.
type Client ¶
type Client interface { Create(containerID string, spec 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) 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 }
Client provides access to containerd features.
type CommonStateInfo ¶
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.
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.ReadCloser Stderr io.ReadCloser Terminal bool // Whether stderr is connected on Windows }
IOPipe contains the stdio streams.
type Process ¶
type Process windowsoci.Process
Process contains information to start a specific application inside the container.
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.
func New ¶
func New(_ string, _ ...RemoteOption) (Remote, error)
New creates a fresh instance of libcontainerd remote. On Windows, this is not used as there is no remote containerd process.
type RemoteOption ¶
RemoteOption allows to configure parameters of remotes. This is unused on Windows.
func WithLiveRestore ¶
func WithLiveRestore(v bool) RemoteOption
WithLiveRestore is a noop on windows.
type Resources ¶
type Resources struct{}
Resources defines updatable container resource values.
type ServicingOption ¶
type ServicingOption struct { IsServicing bool }
ServicingOption is an empty CreateOption with a no-op application that siginifies the container needs to be use for a Windows servicing operation.
func (*ServicingOption) Apply ¶
func (s *ServicingOption) Apply(interface{}) error
Apply for a servicing option is a no-op.
type Spec ¶
type Spec windowsoci.WindowsSpec
Spec is the base configuration for the container.
type StateInfo ¶
type StateInfo struct { CommonStateInfo UpdatePending bool // Indicates that there are some update operations pending that should be completed by a servicing container. }
StateInfo contains description about the new state container has entered.
type Stats ¶
type Stats struct{}
Stats contains a stats properties from containerd.
type StdioCallback ¶
StdioCallback is called to connect a container or process stdio.
type Summary ¶
Summary container a container summary from containerd
type User ¶
type User windowsoci.User
User specifies user information for the containers main process.
Source Files ¶
client.go client_windows.go container.go container_windows.go process.go process_windows.go remote.go remote_windows.go types.go types_windows.go utils_windows.go
Directories ¶
Path | Synopsis |
---|---|
libcontainerd/windowsoci |
- Version
- v1.12.5-rc1
- Published
- Dec 14, 2016
- Platform
- windows/amd64
- Imports
- 16 packages
- Last checked
- 1 minute ago –
Tools for package owners.