Documentation
¶
Index ¶
- Constants
- type Cache
- type Config
- func (self *Config) AddArg(args ...string)
- func (self *Config) AddFlag(name string, value interface{})
- func (self *Config) AddMount(name string, bind string, readonly bool)
- func (self *Config) Argv() []string
- func (self Config) Equals(other Config) bool
- func (self *Config) SetNetworkContainer(id ID)
- type Container
- type ContainerStatus
- type ID
- type Info
- type Manager
- func (manager *Manager) Clean(id ID) error
- func (manager *Manager) Down(id ID) error
- func (manager *Manager) Get(id string) (*Container, error)
- func (manager *Manager) Info() (info Info, err error)
- func (manager *Manager) List(filter ID) (containers []ContainerStatus, err error)
- func (manager *Manager) Logs(id string) (string, error)
- func (manager *Manager) NewCache(eager bool) *Cache
- func (manager *Manager) Panic() (retErr error)
- func (manager *Manager) Up(id ID, config Config) (*Container, error)
- type MemoryInfo
- type NodeInfo
- type Options
- type SwarmInfo
Constants ¶
View Source
const DOCKER_STOP_TIMEOUT = 10 // seconds
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetContainer ¶
* Get full container state.
type Config ¶
type Config struct { Image string `json:"image"` Command string `json:"command"` Args []string `json:"args"` Env util.StringSet `json:"env"` Privileged bool `json:"privileged"` Mounts []docker.Mount `json:"mounts"` NetworkMode string `json:"net_container"` Constraints util.StringSet }
configuration for container read-only; requires remove/create to change
func (Config) Equals ¶
Compare config against running config for compatibility The running config will include additional stuff from the image..
func (*Config) SetNetworkContainer ¶
type Container ¶
type Container struct { ContainerStatus // Config Config Config `json:"config"` // State // TODO: remove? ContainerState docker.State `json:"container_state"` }
Running docker container
type ContainerStatus ¶
type ContainerStatus struct { ID ContainerID string `json:"id"` Node string `json:"node"` Name string `json:"name"` Status string `json:"status"` // human-readable State string `json:"state"` // machine-readable ExitCode int `json:"exit_code"` }
func (*ContainerStatus) IsError ¶
func (self *ContainerStatus) IsError() bool
func (*ContainerStatus) IsUp ¶
func (self *ContainerStatus) IsUp() bool
type ID ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) Down ¶
Stop docker container, if running. Ignored if already stopped.
Leaves the container in place, ready to be restarted
func (*Manager) List ¶
func (manager *Manager) List(filter ID) (containers []ContainerStatus, err error)
Get short container status for given class
type MemoryInfo ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.