Documentation ¶
Index ¶
- func DockerClient(apiVersion string) *client.Client
- type ClientAPI
- func (c *ClientAPI) ConnectNetwork(networkId string, containerId string) error
- func (c *ClientAPI) ContainerLogs(writer http.ResponseWriter, containerId string, follow bool, since string, ...) error
- func (c *ClientAPI) Create(config *container.Config, hostConfig *container.HostConfig, ...) (string, error)
- func (c *ClientAPI) CreateNetwork(containerName string) (string, error)
- func (c *ClientAPI) EnsureImageExist(image string) (bool, error)
- func (c *ClientAPI) EnsureNetworkExist(networkName string) (string, error)
- func (c *ClientAPI) Exec(containerId string, cmd []string) error
- func (c *ClientAPI) ExportImage(imageId string) (io.ReadCloser, error)
- func (c *ClientAPI) FindContainer(containerName string) (string, error)
- func (c *ClientAPI) ImageInfo(imageId string) (*types.ImageInspect, error)
- func (c *ClientAPI) ImportImage(savePath string, repo string, tag string) error
- func (c *ClientAPI) Inspect(containerId string) (*types.ContainerJSON, error)
- func (c *ClientAPI) IsImageUsed(imageID string) (bool, error)
- func (c *ClientAPI) PullImage(imageUrl string) error
- func (c *ClientAPI) RemoveContainer(containerId string, removeVolumes bool) error
- func (c *ClientAPI) RemoveImage(imageId string, removeOpt types.ImageRemoveOptions) error
- func (c *ClientAPI) RemoveNetwork(networkId string) error
- func (c *ClientAPI) Restart(containerId string, timeout int) error
- func (c *ClientAPI) Start(containerId string, startOpts types.ContainerStartOptions) error
- func (c *ClientAPI) Stats(containerId string, stream bool) (*types.ContainerStats, error)
- func (c *ClientAPI) Status(containerId string) (*types.Container, error)
- func (c *ClientAPI) Stop(containerId string, timeout int) error
- type ClientAPIer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerClient ¶
Types ¶
type ClientAPI ¶
func (*ClientAPI) ConnectNetwork ¶
func (*ClientAPI) ContainerLogs ¶
func (*ClientAPI) Create ¶
func (c *ClientAPI) Create(config *container.Config, hostConfig *container.HostConfig, networkConfig *network.NetworkingConfig, containerName string) (string, error)
func (*ClientAPI) CreateNetwork ¶
func (*ClientAPI) EnsureImageExist ¶
func (*ClientAPI) EnsureNetworkExist ¶
func (*ClientAPI) ExportImage ¶
func (c *ClientAPI) ExportImage(imageId string) (io.ReadCloser, error)
func (*ClientAPI) FindContainer ¶
func (*ClientAPI) ImageInfo ¶
func (c *ClientAPI) ImageInfo(imageId string) (*types.ImageInspect, error)
func (*ClientAPI) ImportImage ¶
func (*ClientAPI) Inspect ¶
func (c *ClientAPI) Inspect(containerId string) (*types.ContainerJSON, error)
func (*ClientAPI) RemoveContainer ¶
func (*ClientAPI) RemoveImage ¶
func (c *ClientAPI) RemoveImage(imageId string, removeOpt types.ImageRemoveOptions) error
func (*ClientAPI) RemoveNetwork ¶
func (*ClientAPI) Start ¶
func (c *ClientAPI) Start(containerId string, startOpts types.ContainerStartOptions) error
type ClientAPIer ¶
type ClientAPIer interface { Stop(containerId string, timeout int) error Restart(containerId string, timeout int) error PullImage(imageUrl string) error Create(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (string, error) Start(containerId string, startOpts types.ContainerStartOptions) error EnsureImageExist(image string) (bool, error) CreateNetwork(containerName string) (string, error) ConnectNetwork(networkId string, containerId string) error RemoveImage(imageId string, removeOpt types.ImageRemoveOptions) error Status(containerId string) (*types.Container, error) Inspect(containerId string) (*types.ContainerJSON, error) Stats(containerId string, stream bool) (*types.ContainerStats, error) RemoveContainer(containerId string, removeVolumes bool) error RemoveNetwork(networkId string) error Exec(containerId string, cmd []string) error EnsureNetworkExist(networkName string) (string, error) FindContainer(containerName string) (string, error) IsImageUsed(imageID string) (bool, error) ContainerLogs(writer http.ResponseWriter, containerId string, follow bool, since string, tail string, until string) error ExportImage(imageId string) (io.ReadCloser, error) ImportImage(savePath string, repo string, tag string) error ImageInfo(imageId string) (*types.ImageInspect, error) }
func GetContainerAPIer ¶
func GetContainerAPIer() ClientAPIer
func NewContainerMgr ¶
func NewContainerMgr(apiVersion string) ClientAPIer
Click to show internal directories.
Click to hide internal directories.