Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AddObserver(ob ContainerObserver) error
- func (c *Client) AllContainerIDs() ([]string, error)
- func (c *Client) DockerVersion() string
- func (c *Client) EnsureNetwork(networkName, driver, subnet string, options map[string]interface{}) error
- func (c *Client) GetContainerIP(nameOrID string) (string, error)
- func (c *Client) Info() string
- func (c *Client) IsContainerNotRunning(idStr string) bool
- func (c *Client) RunningContainerIDs() ([]string, error)
- type ContainerObserver
Constants ¶
View Source
const ( InitialInterval = 1 * time.Second MaxInterval = 20 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewVersionedClient ¶ added in v1.2.0
func NewVersionedClientFromEnv ¶ added in v1.4.0
func (*Client) AddObserver ¶
func (c *Client) AddObserver(ob ContainerObserver) error
AddObserver adds an observer for docker events
func (*Client) AllContainerIDs ¶ added in v1.5.0
AllContainerIDs returns all the IDs of Docker containers, whether they are running or not.
func (*Client) DockerVersion ¶ added in v1.6.0
func (*Client) EnsureNetwork ¶
func (*Client) GetContainerIP ¶ added in v1.4.0
This is intended to find an IP address that we can reach the container on; if it is on the Docker bridge network then that address; if on the host network then localhost
func (*Client) IsContainerNotRunning ¶
IsContainerNotRunning returns true if we have checked with Docker that the ID is not running
func (*Client) RunningContainerIDs ¶
RunningContainerIDs returns all the IDs of the running Docker containers.
type ContainerObserver ¶
type ContainerObserver interface { ContainerStarted(ident string) ContainerDied(ident string) ContainerDestroyed(ident string) }
An observer for container events
Click to show internal directories.
Click to hide internal directories.