Documentation ¶
Overview ¶
Package containers is a wrapper around official Docker API.
Index ¶
- Constants
- type Client
- func (c Client) Close() error
- func (c Client) ContainerStatus(ctx context.Context, containerID string) (status string, err error)
- func (c Client) GetRawClient() *client.Client
- func (c Client) KillContainer(ctx context.Context, containerID string) (status string, err error)
- func (c Client) ListContainers(ctx context.Context) (conts []types.Container, err error)
- func (c Client) PrepareMockContainer(ctx context.Context) (id string, err error)
- func (c Client) RemoveMockContainer(ctx context.Context, containerID string) (err error)
- func (c Client) StartContainer(ctx context.Context, containerID string) (status string, err error)
- func (c Client) StopContainer(ctx context.Context, containerID string) (status string, err error)
- type Opts
Constants ¶
View Source
const ( UNKNOWN = iota START = iota STOP = iota KILL = iota )
Constatns used inside the DockerCtlMessage struct
View Source
const (
DefaultTimeout = 45 * time.Second
)
Default values for Docker host endpoint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client structure contains all info about client
func New ¶
New creates new client instance according to endpoint url from ENV with default hostconfig
func (Client) ContainerStatus ¶
ContainerStatus gets information about container's status, Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead"
func (Client) GetRawClient ¶
func (Client) KillContainer ¶
KillContainer kills container specified by the containerID string
func (Client) ListContainers ¶
ListContainers lists all containers running and stopped on the machine
func (Client) PrepareMockContainer ¶
func (Client) RemoveMockContainer ¶
func (Client) StartContainer ¶
StartContainer starts container specified by the containerID string
Click to show internal directories.
Click to hide internal directories.