Documentation ¶
Index ¶
- func MustRestartPolicyModeFromString(pol string) dcontainer.RestartPolicyMode
- func RestartPolicyModeFromString(pol string) (dcontainer.RestartPolicyMode, error)
- func RestartPolicyModeValidValues() string
- func WithAPIClient(ctx context.Context, client APIClient) context.Context
- func WithContainerPurgeKillAttempts(ctx context.Context, attempts uint32) context.Context
- type APIClient
- type Client
- func (d *Client) Close()
- func (d *Client) ConnectContainerToBridgeModeNetwork(ctx context.Context, containerName, networkName, ip string) error
- func (d *Client) ContainerPurgeKillAttempts() uint32
- func (d *Client) CreateContainer(ctx context.Context, containerName string, cConfig *dcontainer.Config, ...) error
- func (d *Client) CreateNetwork(ctx context.Context, networkName string, options dnetwork.CreateOptions) error
- func (d *Client) DisconnectContainerFromNetwork(ctx context.Context, containerName, networkName string) error
- func (d *Client) GetContainerState(ctx context.Context, containerName string) (ContainerState, error)
- func (d *Client) KillContainer(ctx context.Context, containerName string) error
- func (d *Client) NetworkExists(ctx context.Context, networkName string) bool
- func (d *Client) PullImage(ctx context.Context, imageName string) error
- func (d *Client) QueryLocalImage(ctx context.Context, imageName string) (bool, string)
- func (d *Client) RemoveContainer(ctx context.Context, containerName string) error
- func (d *Client) RemoveNetwork(ctx context.Context, networkName string) error
- func (d *Client) StartContainer(ctx context.Context, containerName string) error
- func (d *Client) StopContainer(ctx context.Context, containerName string) error
- type ContainerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRestartPolicyModeFromString ¶ added in v0.1.1
func MustRestartPolicyModeFromString(pol string) dcontainer.RestartPolicyMode
func RestartPolicyModeFromString ¶
func RestartPolicyModeFromString(pol string) (dcontainer.RestartPolicyMode, error)
func RestartPolicyModeValidValues ¶
func RestartPolicyModeValidValues() string
Types ¶
type APIClient ¶
type APIClient interface { Close() error ContainerCreate(ctx context.Context, config *dcontainer.Config, hostConfig *dcontainer.HostConfig, networkingConfig *dnetwork.NetworkingConfig, platform *ocispec.Platform, containerName string) (dcontainer.CreateResponse, error) ContainerInspect(ctx context.Context, containerName string) (dtypes.ContainerJSON, error) ContainerKill(ctx context.Context, containerName, signal string) error ContainerRemove(ctx context.Context, containerName string, options dcontainer.RemoveOptions) error ContainerStart(ctx context.Context, containerName string, options dcontainer.StartOptions) error ContainerStop(ctx context.Context, containerName string, options dcontainer.StopOptions) error ImageList(ctx context.Context, options dimage.ListOptions) ([]dimage.Summary, error) ImagePull(ctx context.Context, refStr string, options dimage.PullOptions) (io.ReadCloser, error) NetworkConnect(ctx context.Context, networkName, containerName string, config *dnetwork.EndpointSettings) error NetworkCreate(ctx context.Context, networkName string, options dnetwork.CreateOptions) (dnetwork.CreateResponse, error) NetworkDisconnect(ctx context.Context, networkName, containerName string, force bool) error NetworkList(ctx context.Context, options dnetwork.ListOptions) ([]dnetwork.Summary, error) NetworkRemove(ctx context.Context, networkName string) error }
func MustAPIClient ¶
func MustRealAPIClient ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ConnectContainerToBridgeModeNetwork ¶
func (*Client) ContainerPurgeKillAttempts ¶ added in v0.1.1
func (*Client) CreateContainer ¶
func (d *Client) CreateContainer(ctx context.Context, containerName string, cConfig *dcontainer.Config, hConfig *dcontainer.HostConfig, nConfig *dnetwork.NetworkingConfig) error
func (*Client) CreateNetwork ¶
func (*Client) DisconnectContainerFromNetwork ¶
func (*Client) GetContainerState ¶
func (*Client) KillContainer ¶
func (*Client) NetworkExists ¶
func (*Client) QueryLocalImage ¶
func (*Client) RemoveContainer ¶
func (*Client) RemoveNetwork ¶
func (*Client) StartContainer ¶
type ContainerState ¶
type ContainerState uint8
const ( ContainerStateUnknown ContainerState = iota ContainerStateNotFound ContainerStateCreated ContainerStateRunning ContainerStatePaused ContainerStateRestarting ContainerStateRemoving ContainerStateExited ContainerStateDead )
func (ContainerState) String ¶
func (c ContainerState) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.