Documentation ¶
Index ¶
- func RealMain()
- type BuildParameters
- type Config
- type Container
- type ContainerMap
- type Containers
- type Dependencies
- type DependencyGraph
- type ExecParameters
- type Hooks
- type OptBool
- type RmParameters
- type RunParameters
- func (r *RunParameters) AddHost() []string
- func (r *RunParameters) CapAdd() []string
- func (r *RunParameters) CapDrop() []string
- func (r *RunParameters) CgroupParent() string
- func (r *RunParameters) Cidfile() string
- func (r *RunParameters) Cmd() []string
- func (r *RunParameters) Device() []string
- 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) Hostname() string
- func (r *RunParameters) Label() []string
- func (r *RunParameters) LabelFile() []string
- func (r *RunParameters) Link() []string
- func (r *RunParameters) LogDriver() string
- func (r *RunParameters) LogOpt() []string
- func (r *RunParameters) LxcConf() []string
- func (r *RunParameters) MacAddress() string
- func (r *RunParameters) Memory() string
- func (r *RunParameters) MemorySwap() string
- func (r *RunParameters) Net() string
- func (r *RunParameters) Pid() string
- func (r *RunParameters) Publish() []string
- func (r *RunParameters) Restart() string
- func (r *RunParameters) SecurityOpt() []string
- func (r *RunParameters) Ulimit() []string
- func (r *RunParameters) User() string
- func (r *RunParameters) Uts() string
- func (r *RunParameters) Volume(configPath string) []string
- func (r *RunParameters) VolumesFrom() []string
- func (r *RunParameters) Workdir() string
- type StartParameters
- type StatusError
- type Target
- type UnitOfWork
- func (uow *UnitOfWork) Associated() []string
- func (uow *UnitOfWork) Containers() Containers
- func (uow *UnitOfWork) Create(cmds []string, excluded []string)
- func (uow *UnitOfWork) Exec(cmds []string)
- func (uow *UnitOfWork) Kill()
- func (uow *UnitOfWork) Lift(cmds []string, excluded []string, noCache bool)
- func (uow *UnitOfWork) Logs(follow bool, timestamps bool, tail string, colorize bool, since string)
- func (uow *UnitOfWork) Pause()
- func (uow *UnitOfWork) Provision(noCache bool)
- func (uow *UnitOfWork) PullImage()
- func (uow *UnitOfWork) Push()
- func (uow *UnitOfWork) Rm(force bool)
- func (uow *UnitOfWork) Run(cmds []string, excluded []string)
- func (uow *UnitOfWork) Start()
- func (uow *UnitOfWork) Stats()
- func (uow *UnitOfWork) Status(noTrunc bool)
- func (uow *UnitOfWork) Stop()
- func (uow *UnitOfWork) Targeted() Containers
- func (uow *UnitOfWork) Unpause()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildParameters ¶
type BuildParameters struct {
RawContext string `json:"context" yaml:"context"`
}
type Config ¶
type Config interface { DependencyGraph(excluded []string) DependencyGraph ContainersForReference(reference string) (result []string) Path() string UniqueId() string Prefix() string ContainerMap() ContainerMap Container(name string) Container }
type Container ¶
type Container interface { Name() string ActualName() string BuildContext() string Image() string ImageWithTag() string Id() string Dependencies(excluded []string) *Dependencies Exists() bool Running() bool Unique() bool Paused() bool ImageExists() bool Status() []string Lift(cmds []string, nocache bool, excluded []string, configPath string) Provision(nocache bool) PullImage() Create(cmds []string, excluded []string, configPath string) Run(cmds []string, excluded []string, configPath string) Start(excluded []string, configPath string) Kill() Stop() Pause() Unpause() Exec(cmds []string, configPath string) Rm(force bool) Logs(follow bool, since string, tail string) (stdout, stderr io.Reader) Push() Hooks() Hooks }
type ContainerMap ¶
ContainerMap maps the container name to its configuration
type Containers ¶
type Containers []Container
func (Containers) Logs ¶
func (containers Containers) Logs(follow bool, timestamps bool, tail string, colorize bool, since string)
Dump container logs.
func (Containers) Provision ¶
func (containers Containers) Provision(nocache bool)
Provision containers.
func (Containers) Reversed ¶
func (containers Containers) Reversed() Containers
type Dependencies ¶
Dependencies contains 4 fields: all: contains all dependencies link: containers linked to volumesFrom: containers that provide volumes net: container the net stack is shared with
type DependencyGraph ¶
type DependencyGraph map[string]*Dependencies
DependencyGraph maps container names to their dependencies
func (DependencyGraph) DOT ¶ added in v0.10.0
func (graph DependencyGraph) DOT(writer io.Writer, targetedContainers Containers)
dumps the dependency graph as a DOT to the writer
type ExecParameters ¶
type OptBool ¶ added in v1.1.1
func (*OptBool) UnmarshalJSON ¶ added in v1.1.1
func (*OptBool) UnmarshalYAML ¶ added in v1.1.1
type RmParameters ¶
type RmParameters struct {
Volumes bool `json:"volumes" yaml:"volumes"`
}
type RunParameters ¶
type RunParameters struct { RawAddHost []string `json:"add-host" yaml:"add-host"` BlkioWeight int `json:"blkio-weight" yaml:"blkio-weight"` RawCapAdd []string `json:"cap-add" yaml:"cap-add"` RawCapDrop []string `json:"cap-drop" yaml:"cap-drop"` RawCgroupParent string `json:"cgroup-parent" yaml:"cgroup-parent"` CpuPeriod int `json:"cpu-period" yaml:"cpu-period"` CpuQuota int `json:"cpu-quota" yaml:"cpu-quota"` RawCidfile string `json:"cidfile" yaml:"cidfile"` Cpuset int `json:"cpuset" yaml:"cpuset"` Detach bool `json:"detach" yaml:"detach"` RawDevice []string `json:"device" yaml:"device"` RawDns []string `json:"dns" yaml:"dns"` RawEntrypoint string `json:"entrypoint" yaml:"entrypoint"` RawEnv interface{} `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"` RawLabel interface{} `json:"label" yaml:"label"` RawLabelFile []string `json:"label-file" yaml:"label-file"` RawLink []string `json:"link" yaml:"link"` RawLogDriver string `json:"log-driver" yaml:"log-driver"` RawLogOpt []string `json:"log-opt" yaml:"log-opt"` RawLxcConf []string `json:"lxc-conf" yaml:"lxc-conf"` RawMacAddress string `json:"mac-address" yaml:"mac-address"` RawMemory string `json:"memory" yaml:"memory"` RawMemorySwap string `json:"memory-swap" yaml:"memory-swap"` RawNet string `json:"net" yaml:"net"` OomKillDisable bool `json:"oom-kill-disable" yaml:"oom-kill-disable"` RawPid string `json:"pid" yaml:"pid"` Privileged bool `json:"privileged" yaml:"privileged"` RawPublish []string `json:"publish" yaml:"publish"` PublishAll bool `json:"publish-all" yaml:"publish-all"` ReadOnly bool `json:"read-only" yaml:"read-only"` RawRestart string `json:"restart" yaml:"restart"` Rm bool `json:"rm" yaml:"rm"` RawSecurityOpt []string `json:"security-opt" yaml:"security-opt"` SigProxy OptBool `json:"sig-proxy" yaml:"sig-proxy"` Tty bool `json:"tty" yaml:"tty"` RawUlimit []string `json:"ulimit" yaml:"ulimit"` RawUser string `json:"user" yaml:"user"` RawUts string `json:"uts" yaml:"uts"` RawVolume []string `json:"volume" yaml:"volume"` RawVolumesFrom []string `json:"volumes-from" yaml:"volumes-from"` RawWorkdir string `json:"workdir" yaml:"workdir"` RawCmd interface{} `json:"cmd" yaml:"cmd"` }
func (*RunParameters) AddHost ¶ added in v0.12.0
func (r *RunParameters) AddHost() []string
func (*RunParameters) CapAdd ¶ added in v0.12.0
func (r *RunParameters) CapAdd() []string
func (*RunParameters) CapDrop ¶ added in v0.12.0
func (r *RunParameters) CapDrop() []string
func (*RunParameters) CgroupParent ¶ added in v1.3.0
func (r *RunParameters) CgroupParent() string
func (*RunParameters) Cidfile ¶
func (r *RunParameters) Cidfile() string
func (*RunParameters) Cmd ¶
func (r *RunParameters) Cmd() []string
func (*RunParameters) Device ¶ added in v0.12.0
func (r *RunParameters) Device() []string
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) Hostname ¶
func (r *RunParameters) Hostname() string
func (*RunParameters) Label ¶ added in v1.3.0
func (r *RunParameters) Label() []string
func (*RunParameters) LabelFile ¶ added in v1.3.0
func (r *RunParameters) LabelFile() []string
func (*RunParameters) Link ¶
func (r *RunParameters) Link() []string
func (*RunParameters) LogDriver ¶ added in v1.3.0
func (r *RunParameters) LogDriver() string
func (*RunParameters) LogOpt ¶ added in v1.5.0
func (r *RunParameters) LogOpt() []string
func (*RunParameters) LxcConf ¶
func (r *RunParameters) LxcConf() []string
func (*RunParameters) MacAddress ¶ added in v1.1.0
func (r *RunParameters) MacAddress() string
func (*RunParameters) Memory ¶
func (r *RunParameters) Memory() string
func (*RunParameters) MemorySwap ¶ added in v1.1.0
func (r *RunParameters) MemorySwap() string
func (*RunParameters) Net ¶
func (r *RunParameters) Net() string
func (*RunParameters) Pid ¶ added in v1.1.0
func (r *RunParameters) Pid() string
func (*RunParameters) Publish ¶
func (r *RunParameters) Publish() []string
func (*RunParameters) Restart ¶ added in v0.11.0
func (r *RunParameters) Restart() string
func (*RunParameters) SecurityOpt ¶ added in v1.1.0
func (r *RunParameters) SecurityOpt() []string
func (*RunParameters) Ulimit ¶ added in v1.3.0
func (r *RunParameters) Ulimit() []string
func (*RunParameters) User ¶
func (r *RunParameters) User() string
func (*RunParameters) Uts ¶ added in v1.5.1
func (r *RunParameters) Uts() string
func (*RunParameters) Volume ¶
func (r *RunParameters) Volume(configPath string) []string
func (*RunParameters) VolumesFrom ¶
func (r *RunParameters) VolumesFrom() []string
func (*RunParameters) Workdir ¶
func (r *RunParameters) Workdir() string
type StartParameters ¶ added in v0.10.0
type StatusError ¶
type StatusError struct {
// contains filtered or unexported fields
}
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
func NewTarget ¶
func NewTarget(graph DependencyGraph, targetFlag string, excluded []string) (target Target, err error)
NewTarget receives the specified target and determines which containers should be targeted. The target might be extended depending whether the dynamic targets "dependencies" and/or "affected" are included in the targetFlag. Additionally, the target is sorted alphabetically.
type UnitOfWork ¶
type UnitOfWork struct {
// contains filtered or unexported fields
}
func NewUnitOfWork ¶
func NewUnitOfWork(graph DependencyGraph, targeted []string) (uow *UnitOfWork, err error)
func (*UnitOfWork) Associated ¶
func (uow *UnitOfWork) Associated() []string
func (*UnitOfWork) Containers ¶
func (uow *UnitOfWork) Containers() Containers
func (*UnitOfWork) Create ¶
func (uow *UnitOfWork) Create(cmds []string, excluded []string)
Create containers.
func (*UnitOfWork) Exec ¶
func (uow *UnitOfWork) Exec(cmds []string)
func (*UnitOfWork) Lift ¶
func (uow *UnitOfWork) Lift(cmds []string, excluded []string, noCache bool)
func (*UnitOfWork) Run ¶
func (uow *UnitOfWork) Run(cmds []string, excluded []string)
func (*UnitOfWork) Stats ¶
func (uow *UnitOfWork) Stats()
func (*UnitOfWork) Status ¶
func (uow *UnitOfWork) Status(noTrunc bool)
func (*UnitOfWork) Targeted ¶
func (uow *UnitOfWork) Targeted() Containers