Documentation ¶
Index ¶
- type ClusterNode
- type Container
- type ContainerAggregateFunc
- type ContainerFunc
- type Engine
- type EngineFunc
- type Manifest
- type ManifestLoader
- type Node
- func (n Node) Aggregate(val interface{}, fn ContainerAggregateFunc) interface{}
- func (n Node) Apply(tmps []Template) error
- func (n Node) ApplyState(cnts []docker.APIContainers) error
- func (n Node) ForAll(fn ContainerFunc) error
- func (n Node) ForAllReversed(fn ContainerFunc) error
- func (n Node) HasContainers() bool
- func (n Node) Info1() string
- func (n Node) Kill() error
- func (n Node) Lift(force bool, kill bool) error
- func (n Node) Provision(force bool) error
- func (n Node) Remove(force bool, kill bool) error
- func (n Node) Run(force bool, kill bool) error
- func (n Node) Start() error
- func (n Node) Status() error
- func (n Node) Stop() error
- func (n Node) String() string
- type RunParameters
- func (r *RunParameters) Binds() []string
- func (r *RunParameters) Cidfile() string
- func (r *RunParameters) Cmd() ([]string, error)
- func (r *RunParameters) CreateDockerConfig() (*docker.Config, error)
- func (r *RunParameters) CreateDockerHostConfig() (*docker.HostConfig, error)
- func (r *RunParameters) Dns() []string
- func (r *RunParameters) Entrypoint() []string
- func (r *RunParameters) Env() []string
- func (r *RunParameters) EnvFile() string
- func (r *RunParameters) Expose() []string
- func (r *RunParameters) ExposedPorts() map[docker.Port]struct{}
- func (r *RunParameters) Hostname() string
- func (r *RunParameters) Link() []string
- func (r *RunParameters) LxcConf() []docker.KeyValuePair
- func (r *RunParameters) Memory() string
- func (r *RunParameters) MemorySwap() string
- func (r *RunParameters) Net() string
- func (r *RunParameters) PortBindings() map[docker.Port][]docker.PortBinding
- func (r *RunParameters) PortMappings() []string
- func (r *RunParameters) User() string
- func (r *RunParameters) Volumes() map[string]struct{}
- func (r *RunParameters) VolumesFrom() string
- func (r *RunParameters) WorkingDir() string
- type Template
- type Tree
- func (t *Tree) AddUnmetRequirement(name string)
- func (t *Tree) First() *list.Element
- func (t *Tree) GetContainerByName(name string) interface{}
- func (t *Tree) GetIndex(cont interface{}) int
- func (t *Tree) Last() *list.Element
- func (t *Tree) Length() int
- func (t *Tree) RemoveUnmetRequirement(name string)
- func (t *Tree) TreeInsertAfter(cont Container, elm *list.Element) *list.Element
- func (t *Tree) TreeInsertBefore(cont Container, elm *list.Element) *list.Element
- func (t *Tree) TreePushBack(cont Container) *list.Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterNode ¶
type ClusterNode struct { Id string `json:"id" yaml:"id"` Address string `json:"address" yaml:"address"` }
/////////////////////////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////////////////////////
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainerFromTemplate ¶
/////////////////////////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////////////////////////
func (*Container) FullQualifiedName ¶
/////////////////////////////////////////////////////////////////////////////////////////////// // FullQualifiedName ///////////////////////////////////////////////////////////////////////////////////////////////
func (*Container) RemoveSelfReference ¶
func (cnt *Container) RemoveSelfReference()
/////////////////////////////////////////////////////////////////////////////////////////////// // RemoveSelfReference ///////////////////////////////////////////////////////////////////////////////////////////////
type ContainerAggregateFunc ¶
type ContainerFunc ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewEngine ¶
///////////////////////////////////////////////////////////////////////////////////////////// NewEngine /////////////////////////////////////////////////////////////////////////////////////////////
func (*Engine) Execute ¶
func (e *Engine) Execute(fn EngineFunc) error
///////////////////////////////////////////////////////////////////////////////////////////// Execute /////////////////////////////////////////////////////////////////////////////////////////////
func (*Engine) ForAllNodes ¶
func (e *Engine) ForAllNodes(fn EngineFunc) error
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Engine) LoadDefaults ¶
///////////////////////////////////////////////////////////////////////////////////////////// LoadFromFile /////////////////////////////////////////////////////////////////////////////////////////////
func (*Engine) LoadFromFile ¶
///////////////////////////////////////////////////////////////////////////////////////////// LoadFromFile /////////////////////////////////////////////////////////////////////////////////////////////
type EngineFunc ¶
type Manifest ¶
type Manifest struct { Id string `json:"manifest-id" yaml:"manifest-id"` Templates []Template `json:"containers" yaml:"containers"` Groups map[string][]string `json:"groups" yaml:"groups"` Nodes []ClusterNode `json:"nodes" yaml:"nodes"` }
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Manifest) GetTemplateNamesByGroup ¶
///////////////////////////////////////////////////////////////////////////////////////////// GetContainerNamesByGroup /////////////////////////////////////////////////////////////////////////////////////////////
func (*Manifest) GetTemplatesByNames ¶
///////////////////////////////////////////////////////////////////////////////////////////// GetContainersByNames /////////////////////////////////////////////////////////////////////////////////////////////
type ManifestLoader ¶
type ManifestLoader struct {
// contains filtered or unexported fields
}
func (*ManifestLoader) LoadDefault ¶
func (m *ManifestLoader) LoadDefault() (*Manifest, error)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*ManifestLoader) LoadFromFile ¶
func (m *ManifestLoader) LoadFromFile(filename string) (*Manifest, error)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a host running Docker. Each node has an ID and an address (in the form <scheme>://<host>:<port>/).
func NewNode ¶
/////////////////////////////////////////////////////////////////////////////////////////////// NewNode ///////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Aggregate ¶
func (n Node) Aggregate(val interface{}, fn ContainerAggregateFunc) interface{}
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Apply ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (Node) ApplyState ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (Node) ForAll ¶
func (n Node) ForAll(fn ContainerFunc) error
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (Node) ForAllReversed ¶
func (n Node) ForAllReversed(fn ContainerFunc) error
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (Node) HasContainers ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Info1 ¶
/////////////////////////////////////////////////////////////////////////////////////////////// Info1 ///////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Kill ¶
///////////////////////////////////////////////////////////////////////////////////////////// Kill containers. /////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Lift ¶
///////////////////////////////////////////////////////////////////////////////////////////// Lift containers (provision + run). When forced, this will rebuild all images and recreate all containers. /////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Provision ¶
///////////////////////////////////////////////////////////////////////////////////////////// Provision containers. When forced, this will rebuild all images. /////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Remove ¶
///////////////////////////////////////////////////////////////////////////////////////////// Remove containers. When forced, stops existing containers first. /////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Run ¶
///////////////////////////////////////////////////////////////////////////////////////////// Run containers. When forced, removes existing containers first. /////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Start ¶
///////////////////////////////////////////////////////////////////////////////////////////// Start containers. /////////////////////////////////////////////////////////////////////////////////////////////
func (Node) Status ¶
///////////////////////////////////////////////////////////////////////////////////////////// Status of containers. /////////////////////////////////////////////////////////////////////////////////////////////
type RunParameters ¶
type RunParameters struct { RawCidfile string `json:"cidfile" yaml:"cidfile"` RawDns []string `json:"dns" yaml:"dns"` RawEntrypoint []string `json:"entrypoint" yaml:"entrypoint"` RawEnv []string `json:"env" yaml:"env"` RawEnvFile string `json:"env-file" yaml:"env-file"` RawExpose []string `json:"expose" yaml:"expose"` RawHostname string `json:"hostname" yaml:"hostname"` Interactive bool `json:"interactive" yaml:"interactive"` RawLink []string `json:"link" yaml:"link"` RawLxcConf []string `json:"lxc-conf" yaml:"lxc-conf"` RawMemory string `json:"memory" yaml:"memory"` RawMemorySwap string `json:"memory-swap" yaml:"memory-swap"` RawNet string `json:"net" yaml:"net"` Privileged bool `json:"privileged" yaml:"privileged"` RawPorts []string `json:"ports" yaml:"ports"` PublishAll bool `json:"publish-all" yaml:"publish-all"` Rm bool `json:"rm" yaml:"rm"` Tty bool `json:"tty" yaml:"tty"` RawUser string `json:"user" yaml:"user"` RawBinds []string `json:"binds" yaml:"binds"` RawVolumesFrom string `json:"volumes-from" yaml:"volumes-from"` RawWorkdir string `json:"workdir" yaml:"workdir"` RawCmd interface{} `json:"cmd" yaml:"cmd"` }
func (*RunParameters) Binds ¶
func (r *RunParameters) Binds() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Cidfile ¶
func (r *RunParameters) Cidfile() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Cmd ¶
func (r *RunParameters) Cmd() ([]string, error)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) CreateDockerConfig ¶
func (r *RunParameters) CreateDockerConfig() (*docker.Config, error)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) CreateDockerHostConfig ¶
func (r *RunParameters) CreateDockerHostConfig() (*docker.HostConfig, error)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Dns ¶
func (r *RunParameters) Dns() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Entrypoint ¶
func (r *RunParameters) Entrypoint() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Env ¶
func (r *RunParameters) Env() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) EnvFile ¶
func (r *RunParameters) EnvFile() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Expose ¶
func (r *RunParameters) Expose() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) ExposedPorts ¶
func (r *RunParameters) ExposedPorts() map[docker.Port]struct{}
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Hostname ¶
func (r *RunParameters) Hostname() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Link ¶
func (r *RunParameters) Link() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) LxcConf ¶
func (r *RunParameters) LxcConf() []docker.KeyValuePair
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Memory ¶
func (r *RunParameters) Memory() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) MemorySwap ¶
func (r *RunParameters) MemorySwap() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Net ¶
func (r *RunParameters) Net() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) PortBindings ¶
func (r *RunParameters) PortBindings() map[docker.Port][]docker.PortBinding
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) PortMappings ¶
func (r *RunParameters) PortMappings() []string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) User ¶
func (r *RunParameters) User() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) Volumes ¶
func (r *RunParameters) Volumes() map[string]struct{}
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) VolumesFrom ¶
func (r *RunParameters) VolumesFrom() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*RunParameters) WorkingDir ¶
func (r *RunParameters) WorkingDir() string
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
type Template ¶
type Template struct { RawName string `json:"name" yaml:"name"` RawImage string `json:"image" yaml:"image"` Requirements []string `json:"required" yaml:"required"` Run RunParameters }
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func NewTree ¶
func NewTree() *Tree
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) AddUnmetRequirement ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) First ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) GetContainerByName ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) GetIndex ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) Last ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) Length ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) RemoveUnmetRequirement ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) TreeInsertAfter ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
func (*Tree) TreeInsertBefore ¶
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////