Documentation
¶
Index ¶
- func IsErrNotFound(err error) bool
- type Container
- type ContainerJSON
- type ContainerListOptions
- type ContainerLogsOptions
- type ContainerRemoveOptions
- type ContainersPruneReport
- type Docker
- func (d *Docker) ConfigCreate(ctx context.Context, spec *swarm.ConfigSpec) (id string, err error)
- func (d *Docker) ConfigInspect(ctx context.Context, id string) (cfg swarm.Config, raw []byte, err error)
- func (d *Docker) ConfigList(ctx context.Context, name string, pageIndex, pageSize int) (configs []swarm.Config, total int, err error)
- func (d *Docker) ConfigRemove(ctx context.Context, id string) error
- func (d *Docker) ConfigUpdate(ctx context.Context, id string, version uint64, spec *swarm.ConfigSpec) error
- func (d *Docker) ContainerExecAttach(ctx context.Context, node, id string) (resp types.HijackedResponse, err error)
- func (d *Docker) ContainerExecCreate(ctx context.Context, node, id string, cmd string) (resp IDResponse, err error)
- func (d *Docker) ContainerExecStart(ctx context.Context, node, id string) (err error)
- func (d *Docker) ContainerInspect(ctx context.Context, node, id string) (container ContainerJSON, raw []byte, err error)
- func (d *Docker) ContainerList(ctx context.Context, node, name, status string, pageIndex, pageSize int) (containers []Container, total int, err error)
- func (d *Docker) ContainerLogs(ctx context.Context, node, id string, lines int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)
- func (d *Docker) ContainerPrune(ctx context.Context, node string) (report ContainersPruneReport, err error)
- func (d *Docker) ContainerRemove(ctx context.Context, node, id string) (err error)
- func (d *Docker) ImageHistory(ctx context.Context, node, id string) (histories []HistoryResponseItem, err error)
- func (d *Docker) ImageInspect(ctx context.Context, node, id string) (image ImageInspect, raw []byte, err error)
- func (d *Docker) ImageList(ctx context.Context, node, name string, pageIndex, pageSize int) (images []ImageSummary, total int, err error)
- func (d *Docker) ImagePrune(ctx context.Context, node string) (report ImagesPruneReport, err error)
- func (d *Docker) ImageRemove(ctx context.Context, node, id string) error
- func (d *Docker) NetworkCount(ctx context.Context) (count int, err error)
- func (d *Docker) NetworkCreate(ctx context.Context, name string, options *NetworkCreate) error
- func (d *Docker) NetworkDisconnect(ctx context.Context, network, container string) error
- func (d *Docker) NetworkInspect(ctx context.Context, name string) (network NetworkResource, raw []byte, err error)
- func (d *Docker) NetworkList(ctx context.Context) (networks []NetworkResource, err error)
- func (d *Docker) NetworkNames(ctx context.Context, ids ...string) (names map[string]string, err error)
- func (d *Docker) NetworkRemove(ctx context.Context, name string) error
- func (d *Docker) NodeCount(ctx context.Context) (count int, err error)
- func (d *Docker) NodeInspect(ctx context.Context, id string) (node swarm.Node, raw []byte, err error)
- func (d *Docker) NodeList(ctx context.Context) (nodes []swarm.Node, err error)
- func (d *Docker) NodeMap() (map[string]*Node, error)
- func (d *Docker) NodeRemove(ctx context.Context, id string) error
- func (d *Docker) NodeUpdate(ctx context.Context, id string, version uint64, spec *swarm.NodeSpec) error
- func (d *Docker) SecretCreate(ctx context.Context, spec *swarm.SecretSpec) (id string, err error)
- func (d *Docker) SecretInspect(ctx context.Context, id string) (secret swarm.Secret, raw []byte, err error)
- func (d *Docker) SecretList(ctx context.Context, name string, pageIndex, pageSize int) (secrets []swarm.Secret, total int, err error)
- func (d *Docker) SecretRemove(ctx context.Context, id string) error
- func (d *Docker) SecretUpdate(ctx context.Context, id string, version uint64, spec *swarm.SecretSpec) error
- func (d *Docker) ServiceCount(ctx context.Context) (count int, err error)
- func (d *Docker) ServiceCreate(ctx context.Context, spec *swarm.ServiceSpec, registryAuth string) error
- func (d *Docker) ServiceInspect(ctx context.Context, name string, status bool) (service swarm.Service, raw []byte, err error)
- func (d *Docker) ServiceList(ctx context.Context, name, mode string, pageIndex, pageSize int) (services []swarm.Service, totalCount int, err error)
- func (d *Docker) ServiceLogs(ctx context.Context, name string, lines int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)
- func (d *Docker) ServiceRemove(ctx context.Context, name string) error
- func (d *Docker) ServiceRestart(ctx context.Context, name string) error
- func (d *Docker) ServiceRollback(ctx context.Context, name string) error
- func (d *Docker) ServiceScale(ctx context.Context, name string, count, version uint64) error
- func (d *Docker) ServiceSearch(ctx context.Context, args filters.Args) (services []swarm.Service, err error)
- func (d *Docker) ServiceUpdate(ctx context.Context, spec *swarm.ServiceSpec, version uint64) error
- func (d *Docker) StackCount(ctx context.Context) (count int, err error)
- func (d *Docker) StackDeploy(ctx context.Context, cfg *composetypes.Config, authes map[string]string) error
- func (d *Docker) StackList(ctx context.Context) (stacks map[string][]string, err error)
- func (d *Docker) StackRemove(ctx context.Context, name string) error
- func (d *Docker) TaskInspect(ctx context.Context, id string) (task swarm.Task, raw []byte, err error)
- func (d *Docker) TaskList(ctx context.Context, node, service, state string, pageIndex, pageSize int) (tasks []swarm.Task, total int, err error)
- func (d *Docker) TaskLogs(ctx context.Context, id string, lines int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)
- func (d *Docker) VolumeCreate(ctx context.Context, node string, options *VolumeCreateBody) (err error)
- func (d *Docker) VolumeInspect(ctx context.Context, node, name string) (vol Volume, raw []byte, err error)
- func (d *Docker) VolumeList(ctx context.Context, node, name string, pageIndex, pageSize int) (volumes []*Volume, total int, err error)
- func (d *Docker) VolumePrune(ctx context.Context, node string) (report VolumesPruneReport, err error)
- func (d *Docker) VolumeRemove(ctx context.Context, node, name string) (err error)
- type ExecConfig
- type ExecStartCheck
- type HistoryResponseItem
- type IDResponse
- type ImageInspect
- type ImageListOptions
- type ImageRemoveOptions
- type ImageSummary
- type ImagesPruneReport
- type NetworkCreate
- type NetworkInspectOptions
- type NetworkListOptions
- type NetworkResource
- type Node
- type ServiceCreateOptions
- type ServiceCreateResponse
- type ServiceListOptions
- type ServiceUpdateOptions
- type ServiceUpdateResponse
- type Volume
- type VolumeCreateBody
- type VolumeListOKBody
- type VolumeListOptions
- type VolumesPruneReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Container ¶
type Container = containertypes.Summary
type ContainerJSON ¶
type ContainerJSON = containertypes.InspectResponse
type ContainerListOptions ¶
type ContainerListOptions = containertypes.ListOptions
type ContainerLogsOptions ¶
type ContainerLogsOptions = containertypes.LogsOptions
type ContainerRemoveOptions ¶
type ContainerRemoveOptions = containertypes.RemoveOptions
type ContainersPruneReport ¶
type ContainersPruneReport = containertypes.PruneReport
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
func (*Docker) ConfigCreate ¶
ConfigCreate create a config.
func (*Docker) ConfigInspect ¶
func (d *Docker) ConfigInspect(ctx context.Context, id string) (cfg swarm.Config, raw []byte, err error)
ConfigInspect returns config information with raw data.
func (*Docker) ConfigList ¶
func (d *Docker) ConfigList(ctx context.Context, name string, pageIndex, pageSize int) (configs []swarm.Config, total int, err error)
ConfigList return all configs.
func (*Docker) ConfigRemove ¶
ConfigRemove remove a config.
func (*Docker) ConfigUpdate ¶
func (d *Docker) ConfigUpdate(ctx context.Context, id string, version uint64, spec *swarm.ConfigSpec) error
ConfigUpdate update a config.
func (*Docker) ContainerExecAttach ¶
func (d *Docker) ContainerExecAttach(ctx context.Context, node, id string) (resp types.HijackedResponse, err error)
ContainerExecAttach attaches a connection to an exec process in the server.
func (*Docker) ContainerExecCreate ¶
func (d *Docker) ContainerExecCreate(ctx context.Context, node, id string, cmd string) (resp IDResponse, err error)
ContainerExecCreate creates an exec instance.
func (*Docker) ContainerExecStart ¶
ContainerExecStart starts an exec instance.
func (*Docker) ContainerInspect ¶
func (d *Docker) ContainerInspect(ctx context.Context, node, id string) (container ContainerJSON, raw []byte, err error)
ContainerInspect return container raw information.
func (*Docker) ContainerList ¶
func (d *Docker) ContainerList(ctx context.Context, node, name, status string, pageIndex, pageSize int) (containers []Container, total int, err error)
ContainerList return containers on the host.
func (*Docker) ContainerLogs ¶
func (d *Docker) ContainerLogs(ctx context.Context, node, id string, lines int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)
ContainerLogs returns the logs generated by a container.
func (*Docker) ContainerPrune ¶
func (d *Docker) ContainerPrune(ctx context.Context, node string) (report ContainersPruneReport, err error)
ContainerPrune remove all unused containers.
func (*Docker) ContainerRemove ¶
ContainerRemove remove a container.
func (*Docker) ImageHistory ¶
func (d *Docker) ImageHistory(ctx context.Context, node, id string) (histories []HistoryResponseItem, err error)
ImageHistory returns the changes in an image in history format.
func (*Docker) ImageInspect ¶
func (d *Docker) ImageInspect(ctx context.Context, node, id string) (image ImageInspect, raw []byte, err error)
ImageInspect returns image information.
func (*Docker) ImageList ¶
func (d *Docker) ImageList(ctx context.Context, node, name string, pageIndex, pageSize int) (images []ImageSummary, total int, err error)
ImageList return images on the host.
func (*Docker) ImagePrune ¶
ImagePrune remove all unused images.
func (*Docker) ImageRemove ¶
ImageRemove remove a image.
func (*Docker) NetworkCount ¶
NetworkCount return number of networks.
func (*Docker) NetworkCreate ¶
NetworkCreate create a network.
func (*Docker) NetworkDisconnect ¶
NetworkDisconnect Disconnect a container from a network.
func (*Docker) NetworkInspect ¶
func (d *Docker) NetworkInspect(ctx context.Context, name string) (network NetworkResource, raw []byte, err error)
NetworkInspect return network information.
func (*Docker) NetworkList ¶
func (d *Docker) NetworkList(ctx context.Context) (networks []NetworkResource, err error)
NetworkList return all networks.
func (*Docker) NetworkNames ¶
func (d *Docker) NetworkNames(ctx context.Context, ids ...string) (names map[string]string, err error)
NetworkNames return network names by id list.
func (*Docker) NetworkRemove ¶
NetworkRemove remove a network.
func (*Docker) NodeCount ¶
NodeCount return number of swarm nodes.
func (*Docker) NodeInspect ¶
func (d *Docker) NodeInspect(ctx context.Context, id string) (node swarm.Node, raw []byte, err error)
NodeInspect return node information.
func (*Docker) NodeList ¶
NodeList return all swarm nodes.
func (*Docker) NodeRemove ¶
NodeRemove remove a swarm node from cluster.
func (*Docker) NodeUpdate ¶
func (d *Docker) NodeUpdate(ctx context.Context, id string, version uint64, spec *swarm.NodeSpec) error
NodeUpdate update a node.
func (*Docker) SecretCreate ¶
SecretCreate create a secret.
func (*Docker) SecretInspect ¶
func (d *Docker) SecretInspect(ctx context.Context, id string) (secret swarm.Secret, raw []byte, err error)
SecretInspect returns secret information with raw data.
func (*Docker) SecretList ¶
func (d *Docker) SecretList(ctx context.Context, name string, pageIndex, pageSize int) (secrets []swarm.Secret, total int, err error)
SecretList return all secrets.
func (*Docker) SecretRemove ¶
SecretRemove remove a secret.
func (*Docker) SecretUpdate ¶
func (d *Docker) SecretUpdate(ctx context.Context, id string, version uint64, spec *swarm.SecretSpec) error
SecretUpdate update a config.
func (*Docker) ServiceCount ¶
ServiceCount return number of services.
func (*Docker) ServiceCreate ¶
func (d *Docker) ServiceCreate(ctx context.Context, spec *swarm.ServiceSpec, registryAuth string) error
ServiceCreate create a service.
func (*Docker) ServiceInspect ¶
func (d *Docker) ServiceInspect(ctx context.Context, name string, status bool) (service swarm.Service, raw []byte, err error)
ServiceInspect return service raw information.
func (*Docker) ServiceList ¶
func (d *Docker) ServiceList(ctx context.Context, name, mode string, pageIndex, pageSize int) (services []swarm.Service, totalCount int, err error)
ServiceList return service list.
func (*Docker) ServiceLogs ¶
func (d *Docker) ServiceLogs(ctx context.Context, name string, lines int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)
ServiceLogs returns the logs generated by a service.
func (*Docker) ServiceRemove ¶
ServiceRemove remove a service.
func (*Docker) ServiceRestart ¶
ServiceRestart force to refresh a service.
func (*Docker) ServiceRollback ¶
ServiceRollback rollbacks a service.
func (*Docker) ServiceScale ¶
ServiceScale adjust replicas of a service.
func (*Docker) ServiceSearch ¶
func (d *Docker) ServiceSearch(ctx context.Context, args filters.Args) (services []swarm.Service, err error)
ServiceSearch search services with args.
func (*Docker) ServiceUpdate ¶
ServiceUpdate update a service.
func (*Docker) StackCount ¶
StackCount return number of stacks.
func (*Docker) StackDeploy ¶
func (d *Docker) StackDeploy(ctx context.Context, cfg *composetypes.Config, authes map[string]string) error
StackDeploy deploy a stack.
func (*Docker) StackList ¶
StackList return all stacks.
func (*Docker) StackRemove ¶
StackRemove remove a stack.
func (*Docker) TaskInspect ¶
func (d *Docker) TaskInspect(ctx context.Context, id string) (task swarm.Task, raw []byte, err error)
TaskInspect return detail information of a task.
func (*Docker) TaskList ¶
func (d *Docker) TaskList(ctx context.Context, node, service, state string, pageIndex, pageSize int) (tasks []swarm.Task, total int, err error)
TaskList return all running tasks of a service or a node.
func (*Docker) TaskLogs ¶
func (d *Docker) TaskLogs(ctx context.Context, id string, lines int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)
TaskLogs returns the logs generated by a task in an io.ReadCloser.
func (*Docker) VolumeCreate ¶
func (d *Docker) VolumeCreate(ctx context.Context, node string, options *VolumeCreateBody) (err error)
VolumeCreate create a volume.
func (*Docker) VolumeInspect ¶
func (d *Docker) VolumeInspect(ctx context.Context, node, name string) (vol Volume, raw []byte, err error)
VolumeInspect return volume raw information.
func (*Docker) VolumeList ¶
func (d *Docker) VolumeList(ctx context.Context, node, name string, pageIndex, pageSize int) (volumes []*Volume, total int, err error)
VolumeList return volumes on host.
type ExecConfig ¶
type ExecConfig = containertypes.ExecOptions
type ExecStartCheck ¶
type ExecStartCheck = containertypes.ExecStartOptions
type HistoryResponseItem ¶
type HistoryResponseItem = image.HistoryResponseItem
type IDResponse ¶
type IDResponse = containertypes.ExecCreateResponse
type ImageInspect ¶
type ImageInspect = image.InspectResponse
type ImageListOptions ¶
type ImageListOptions = image.ListOptions
type ImageRemoveOptions ¶
type ImageRemoveOptions = image.RemoveOptions
type ImagesPruneReport ¶
type ImagesPruneReport = image.PruneReport
type NetworkCreate ¶
type NetworkCreate = networktypes.CreateRequest
type NetworkInspectOptions ¶
type NetworkInspectOptions = networktypes.InspectOptions
type NetworkListOptions ¶
type NetworkListOptions = networktypes.ListOptions
type NetworkResource ¶
type NetworkResource = networktypes.Inspect
type Node ¶
type ServiceCreateOptions ¶
type ServiceCreateOptions = swarm.ServiceCreateOptions
type ServiceCreateResponse ¶
type ServiceCreateResponse = swarm.ServiceCreateResponse
type ServiceListOptions ¶
type ServiceListOptions = swarm.ServiceListOptions
type ServiceUpdateOptions ¶
type ServiceUpdateOptions = swarm.ServiceUpdateOptions
type ServiceUpdateResponse ¶
type ServiceUpdateResponse = swarm.ServiceUpdateResponse
type VolumeCreateBody ¶
type VolumeCreateBody = volume.CreateOptions
type VolumeListOKBody ¶
type VolumeListOKBody = volume.ListResponse
type VolumeListOptions ¶
type VolumeListOptions = volume.ListOptions
type VolumesPruneReport ¶
type VolumesPruneReport = volume.PruneReport
Source Files
¶
- config.go
- container.go
- docker.go
- image.go
- network.go
- node.go
- secret.go
- service.go
- stack.go
- task.go
- volume.go