Documentation ¶
Index ¶
- Constants
- type Docker
- func (d *Docker) ComposeIsAuthorized(compose *types2.Config) bool
- func (d *Docker) ComposeParse(ctx context.Context, composeFile []byte) (*types2.Config, error)
- func (d *Docker) Connect() (err error)
- func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, ...) (*container.ContainerCreateCreatedBody, error)
- func (d *Docker) ExpectedNumberOfTasks(ctx context.Context, serviceID string) (int, error)
- func (d *Docker) GetClient() *client.Client
- func (d *Docker) ImagePull(ctx context.Context, image string) error
- func (d *Docker) NodeInspect(ctx context.Context, nodeID string) (swarm.Node, error)
- func (d *Docker) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error)
- func (d *Docker) ServiceInspect(ctx context.Context, service string) (swarm.Service, error)
- func (d *Docker) ServiceScale(ctx context.Context, service string, scale uint64) error
- func (d *Docker) ServiceStatus(ctx context.Context, service string) (*ServiceStatus, error)
- func (d *Docker) ServicesList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)
- func (d *Docker) StackDeploy(ctx context.Context, stackName string, composeFile []byte, configFile []byte) (output string, err error)
- func (d *Docker) StackList(ctx context.Context) (output string, err error)
- func (d *Docker) StackRemove(ctx context.Context, stackName string) (output string, err error)
- func (d *Docker) StackServices(ctx context.Context, stackName string, quietOption bool) (output string, err error)
- func (d *Docker) StackStatus(ctx context.Context, stackName string) (*StackStatus, error)
- func (d *Docker) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error)
- type ServiceStatus
- type StackStatus
Constants ¶
View Source
const ( DefaultURL = "unix:///var/run/docker.sock" DefaultVersion = "1.27" StateStarting = "STARTING" StateRunning = "RUNNING" StateError = "ERROR" StateNoMatchingNode = "NO MATCHING NODE" )
Docker constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker wrapper
func (*Docker) ComposeIsAuthorized ¶ added in v0.12.0
ComposeIsAuthorized checks if the given compose file is authorized
func (*Docker) ComposeParse ¶ added in v0.12.0
ComposeParse parses a compose file
func (*Docker) ContainerCreate ¶
func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, name string) (*container.ContainerCreateCreatedBody, error)
ContainerCreate creates a container and pulls the image if needed
func (*Docker) ExpectedNumberOfTasks ¶ added in v0.12.0
ExpectedNumberOfTasks returns expected number of tasks of a service
func (*Docker) NodeInspect ¶ added in v0.12.0
NodeInspect inspects a node
func (*Docker) ServiceInspect ¶ added in v0.12.0
ServiceInspect inspects a service
func (*Docker) ServiceScale ¶ added in v0.12.0
ServiceScale scales a service
func (*Docker) ServiceStatus ¶ added in v0.12.0
ServiceStatus returns service status
func (*Docker) ServicesList ¶ added in v0.12.0
func (d *Docker) ServicesList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)
ServiceList list the services
func (*Docker) StackDeploy ¶ added in v0.9.1
func (d *Docker) StackDeploy(ctx context.Context, stackName string, composeFile []byte, configFile []byte) (output string, err error)
StackDeploy deploy a stack
func (*Docker) StackRemove ¶ added in v0.9.1
StackRemove remove a stack
func (*Docker) StackServices ¶ added in v0.11.0
func (d *Docker) StackServices(ctx context.Context, stackName string, quietOption bool) (output string, err error)
StackServices list the services of a stack
func (*Docker) StackStatus ¶ added in v0.12.0
StackStatus returns stack status
type ServiceStatus ¶ added in v0.12.0
Click to show internal directories.
Click to hide internal directories.