Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrContainerNotFound = errors.New("container not found")
Functions ¶
This section is empty.
Types ¶
type ContainerRuntime ¶
type ContainerRuntime interface { // Start creates and starts a container. Start(Container) error // Stop stops a running container. // Runtime waits for the container to stop gracefully for the given timeout. // After the timeout, the container is killed. // If the container is not found, ErrContainerNotFound is returned. Stop(containerName string, timeout time.Duration) error // Remove removes a container. // Running containers are killed before removal. // If the container is not found, no error is returned. Remove(containerName string) error // State returns the state of a container. // If the container is not found, ErrContainerNotFound is returned. State(containerName string) (ContainerState, error) }
type ContainerState ¶
type ContainerState int
const ( ContainerStateRunning ContainerState = iota + 1 ContainerStateSucceeded ContainerStateFailed )
type Descriptor ¶
type Resource ¶
type Resource interface { Create(ContainerRuntime) error Remove(ContainerRuntime) error UpdateStatus(ContainerRuntime) error Descriptor() Descriptor State() State Status() []StatusEntry encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
type StatusEntry ¶
Click to show internal directories.
Click to hide internal directories.