Versions in this module Expand all Collapse all v0 v0.2.0 Nov 8, 2024 Changes in this version + 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 interface + Close func() error + ContainerCreate func(ctx context.Context, config *dcontainer.Config, ...) (dcontainer.CreateResponse, error) + ContainerInspect func(ctx context.Context, containerName string) (dtypes.ContainerJSON, error) + ContainerKill func(ctx context.Context, containerName, signal string) error + ContainerRemove func(ctx context.Context, containerName string, options dcontainer.RemoveOptions) error + ContainerStart func(ctx context.Context, containerName string, options dcontainer.StartOptions) error + ContainerStop func(ctx context.Context, containerName string, options dcontainer.StopOptions) error + ImageList func(ctx context.Context, options dimage.ListOptions) ([]dimage.Summary, error) + ImagePull func(ctx context.Context, refStr string, options dimage.PullOptions) (io.ReadCloser, error) + NetworkConnect func(ctx context.Context, networkName, containerName string, ...) error + NetworkCreate func(ctx context.Context, networkName string, options dnetwork.CreateOptions) (dnetwork.CreateResponse, error) + NetworkDisconnect func(ctx context.Context, networkName, containerName string, force bool) error + NetworkList func(ctx context.Context, options dnetwork.ListOptions) ([]dnetwork.Summary, error) + NetworkRemove func(ctx context.Context, networkName string) error + func APIClientFromContext(ctx context.Context) (APIClient, bool) + func MustAPIClient(ctx context.Context) APIClient + func MustRealAPIClient(ctx context.Context) APIClient + type Client struct + func NewClient(ctx context.Context) *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 uint8 + const ContainerStateCreated + const ContainerStateDead + const ContainerStateExited + const ContainerStateNotFound + const ContainerStatePaused + const ContainerStateRemoving + const ContainerStateRestarting + const ContainerStateRunning + const ContainerStateUnknown + func (c ContainerState) String() string