docker

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigCreate

func ConfigCreate(info *model.ConfigCreateInfo) error

ConfigCreate create a config.

func ConfigInspect

func ConfigInspect(id string) (cfg swarm.Config, raw []byte, err error)

ConfigInspect returns config information with raw data.

func ConfigList

func ConfigList(name string, pageIndex, pageSize int) (configs []swarm.Config, totalCount int, err error)

ConfigList return all configs.

func ConfigRemove

func ConfigRemove(ids []string) error

ConfigRemove remove a config.

func ConfigUpdate

func ConfigUpdate(info *model.ConfigUpdateInfo) error

ConfigUpdate update a config.

func ContainerExecAttach added in v0.8.3

func ContainerExecAttach(id string) (resp types.HijackedResponse, err error)

ContainerExecAttach attaches a connection to an exec process in the server.

func ContainerExecCreate added in v0.8.3

func ContainerExecCreate(id string, cmd string) (resp types.IDResponse, err error)

ContainerExecCreate creates an exec instance.

func ContainerExecStart added in v0.8.3

func ContainerExecStart(id string) error

ContainerExecStart starts an exec instance.

func ContainerInspect

func ContainerInspect(id string) (container types.ContainerJSON, err error)

ContainerInspect return detail information of a container.

func ContainerInspectRaw

func ContainerInspectRaw(id string) (container types.ContainerJSON, raw []byte, err error)

ContainerInspectRaw return container raw information.

func ContainerList

func ContainerList(args *model.ContainerListArgs) (infos []*model.ContainerListInfo, totalCount int, err error)

ContainerList return containers on the host.

func ContainerLogs

func ContainerLogs(id string, line int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)

ContainerLogs returns the logs generated by a container.

func ContainerRemove

func ContainerRemove(id string) error

ContainerRemove remove a container.

func ImageHistory

func ImageHistory(id string) (histories []image.HistoryResponseItem, err error)

ImageHistory returns the changes in an image in history format.

func ImageInspect

func ImageInspect(id string) (image types.ImageInspect, raw []byte, err error)

ImageInspect returns image information.

func ImageList

func ImageList(name string, pageIndex, pageSize int) (images []*model.ImageListInfo, totalCount int, err error)

ImageList return images on the host.

func ImageRemove

func ImageRemove(id string) error

ImageRemove remove a image.

func NetworkCount

func NetworkCount() (count int, err error)

NetworkCount return number of networks.

func NetworkCreate

func NetworkCreate(info *model.NetworkCreateInfo) error

NetworkCreate create a network.

func NetworkDisconnect

func NetworkDisconnect(name, container string) error

NetworkDisconnect Disconnect a container from a network.

func NetworkInspect

func NetworkInspect(name string) (network types.NetworkResource, err error)

NetworkInspect return network information.

func NetworkInspectRaw

func NetworkInspectRaw(name string) (raw []byte, err error)

NetworkInspectRaw return network raw information.

func NetworkList

func NetworkList() (networks []types.NetworkResource, err error)

NetworkList return all networks.

func NetworkNames

func NetworkNames(ids ...string) (names []string, err error)

NetworkNames return network names by id list.

func NetworkRemove

func NetworkRemove(name string) error

NetworkRemove remove a network.

func NodeCount

func NodeCount() (count int, err error)

NodeCount return number of swarm nodes.

func NodeInspect

func NodeInspect(id string) (node swarm.Node, raw []byte, err error)

NodeInspect return node information.

func NodeList

func NodeList() (infos []*model.NodeListInfo, err error)

NodeList return all swarm nodes.

func NodeRemove

func NodeRemove(id string) error

NodeRemove remove a swarm node from cluster.

func NodeUpdate

func NodeUpdate(id string, info *model.NodeUpdateInfo) error

NodeUpdate update a node.

func SecretCreate

func SecretCreate(info *model.ConfigCreateInfo) error

SecretCreate create a secret.

func SecretInspect

func SecretInspect(id string) (secret swarm.Secret, raw []byte, err error)

SecretInspect returns secret information with raw data.

func SecretList

func SecretList(name string, pageIndex, pageSize int) (secrets []swarm.Secret, totalCount int, err error)

SecretList return all secrets.

func SecretRemove

func SecretRemove(id string) error

SecretRemove remove a secret.

func SecretUpdate

func SecretUpdate(info *model.ConfigUpdateInfo) error

SecretUpdate update a config.

func ServiceCommand

func ServiceCommand(name string) (cmd string, err error)

ServiceCommand returns the docker command line to create this service.

func ServiceCount

func ServiceCount() (count int, err error)

ServiceCount return number of services.

func ServiceCreate

func ServiceCreate(info *model.ServiceInfo) error

ServiceCreate create a service.

func ServiceInspect

func ServiceInspect(name string) (service swarm.Service, raw []byte, err error)

ServiceInspect return service raw information.

func ServiceList

func ServiceList(name string, pageIndex, pageSize int) (infos []*model.ServiceListInfo, totalCount int, err error)

ServiceList return service list.

func ServiceLogs

func ServiceLogs(name string, line int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)

ServiceLogs returns the logs generated by a service.

func ServiceRemove

func ServiceRemove(name string) error

ServiceRemove remove a service.

func ServiceRestart added in v0.8.3

func ServiceRestart(name string) error

ServiceRestart force to refresh a service.

func ServiceRollback

func ServiceRollback(name string) error

ServiceRollback rollbacks a service.

func ServiceScale

func ServiceScale(name string, version, count uint64) error

ServiceScale adjust replicas of a service.

func ServiceSearch

func ServiceSearch(args filters.Args) (services []swarm.Service, err error)

ServiceSearch search services with args.

func ServiceUpdate

func ServiceUpdate(info *model.ServiceInfo) error

ServiceUpdate update a service.

func StackCount

func StackCount() (count int, err error)

StackCount return number of stacks.

func StackDeploy

func StackDeploy(name, content string, authes map[string]string) error

StackDeploy deploy a stack.

func StackList

func StackList() (stacks []*model.Stack, err error)

StackList return all stacks.

func StackRemove

func StackRemove(name string) error

StackRemove remove a stack.

func TaskInspect

func TaskInspect(id string) (task swarm.Task, raw []byte, err error)

TaskInspect return detail information of a task.

func TaskList

func TaskList(args *model.TaskListArgs) (infos []*model.TaskInfo, totalCount int, err error)

TaskList return all running tasks of a service or a node.

func TaskLogs

func TaskLogs(id string, line int, timestamps bool) (stdout, stderr *bytes.Buffer, err error)

TaskLogs returns the logs generated by a task in an io.ReadCloser. It's up to the caller to close the stream.

func VolumeCreate

func VolumeCreate(info *model.VolumeCreateInfo) error

VolumeCreate create a volume.

func VolumeInspectRaw

func VolumeInspectRaw(name string) (vol types.Volume, raw []byte, err error)

VolumeInspectRaw return volume raw information.

func VolumeList

func VolumeList(name string, pageIndex, pageSize int) (volumes []*types.Volume, totalCount int, err error)

VolumeList return volumes on the host.

func VolumePrune

func VolumePrune() (report types.VolumesPruneReport, err error)

VolumePrune remove all unused volumes.

func VolumeRemove

func VolumeRemove(name string) error

VolumeRemove remove a volume.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL