Documentation ¶
Index ¶
- type APIClient
- type Client
- func (c *Client) ConnectNetwork(name string, container *dc.Container) error
- func (c *Client) CreateContainer(opts dc.CreateContainerOptions) (*dc.Container, error)
- func (c *Client) CreateNetwork(opts dc.CreateNetworkOptions) (*dc.Network, error)
- func (c *Client) CreateVolume(opts dc.CreateVolumeOptions) (*dc.Volume, error)
- func (c *Client) FindContainer(name string) (*dc.Container, error)
- func (c *Client) FindImage(repoTag string) (*dc.Image, error)
- func (c *Client) FindNetwork(name string) (*dc.Network, error)
- func (c *Client) FindVolume(name string) (*dc.Volume, error)
- func (c *Client) ListNetworks() ([]dc.Network, error)
- func (c *Client) PullImage(name, tag string) error
- func (c *Client) RemoveNetwork(name string) error
- func (c *Client) RemoveVolume(name string) error
- func (c *Client) StartContainer(name, containerID string) error
- type NetworkClient
- type Port
- type VolumeClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface { FindImage(string) (*dc.Image, error) PullImage(string, string) error FindContainer(string) (*dc.Container, error) CreateContainer(dc.CreateContainerOptions) (*dc.Container, error) StartContainer(string, string) error ConnectNetwork(string, *dc.Container) error }
APIClient provides access to docker
type Client ¶
Client provides api access to Docker
func NewDockerClient ¶
NewDockerClient returns a docker client with the default configuration
func (*Client) ConnectNetwork ¶
ConnectNetwork connects the container to a network
func (*Client) CreateContainer ¶
CreateContainer creates a container with the specified options
func (*Client) CreateNetwork ¶
CreateNetwork creates a docker network
func (*Client) CreateVolume ¶
CreateVolume creates a docker volume
func (*Client) FindContainer ¶
FindContainer returns a container matching the specified name
func (*Client) FindNetwork ¶
FindNetwork finds the network with the specified name
func (*Client) FindVolume ¶
FindVolume finds the volume with the specified name
func (*Client) ListNetworks ¶
ListNetworks returns the docker networks
func (*Client) RemoveNetwork ¶
RemoveNetwork removes a docker volume
func (*Client) RemoveVolume ¶
RemoveVolume removes a docker volume
func (*Client) StartContainer ¶
StartContainer starts the container with the specified ID
type NetworkClient ¶
type NetworkClient interface { ListNetworks() ([]dc.Network, error) FindNetwork(string) (*dc.Network, error) CreateNetwork(dc.CreateNetworkOptions) (*dc.Network, error) RemoveNetwork(string) error }
NetworkClient manage Docker networks