Documentation ¶
Index ¶
- func RealMain()
- type BuildParameters
- type Config
- type Container
- type ContainerInfo
- type ContainerMap
- type Containers
- type Dependencies
- type ExecParameters
- type Hooks
- type LogSource
- type Network
- type NetworkMap
- type OptBool
- type OptInt
- type RmParameters
- type RunParameters
- func (r RunParameters) ActualNet() string
- func (r RunParameters) ActualVolume() []string
- func (r RunParameters) AddHost() []string
- func (r RunParameters) BlkioWeightDevice() []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) DNS() []string
- func (r RunParameters) DNSOpt() []string
- func (r RunParameters) DNSSearch() []string
- func (r RunParameters) DetachKeys() string
- func (r RunParameters) Device() []string
- func (r RunParameters) DeviceReadBps() []string
- func (r RunParameters) DeviceReadIops() []string
- func (r RunParameters) DeviceWriteBps() []string
- func (r RunParameters) DeviceWriteIops() []string
- func (r RunParameters) Entrypoint() string
- func (r RunParameters) Env() []string
- func (r RunParameters) EnvFile() []string
- func (r RunParameters) Expose() []string
- func (r RunParameters) GroupAdd() []string
- func (r RunParameters) Hostname() string
- func (r RunParameters) IPC() string
- func (r RunParameters) Ip() string
- func (r RunParameters) Ip6() string
- func (r RunParameters) Isolation() string
- func (r RunParameters) KernelMemory() 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) MemoryReservation() string
- func (r RunParameters) MemorySwap() string
- func (r RunParameters) Net() string
- func (r RunParameters) NetAlias() []string
- func (r RunParameters) OomScoreAdj() string
- func (r RunParameters) Pid() string
- func (r RunParameters) Publish() []string
- func (r RunParameters) Restart() string
- func (r RunParameters) SecurityOpt() []string
- func (r RunParameters) ShmSize() string
- func (r RunParameters) StopSignal() string
- func (r RunParameters) Tmpfs() []string
- func (r RunParameters) Ulimit() []string
- func (r RunParameters) User() string
- func (r RunParameters) Uts() string
- func (r RunParameters) Volume() []string
- func (r RunParameters) VolumeDriver() string
- func (r RunParameters) VolumeSources() []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)
- func (uow *UnitOfWork) Exec(cmds []string)
- func (uow *UnitOfWork) Generate(templateFile string, output string)
- func (uow *UnitOfWork) Kill()
- func (uow *UnitOfWork) Lift(cmds []string, noCache bool, parallel int)
- func (uow *UnitOfWork) Logs(follow bool, timestamps bool, tail string, colorize bool, since string)
- func (uow *UnitOfWork) Pause()
- func (uow *UnitOfWork) Provision(noCache bool, parallel int)
- func (uow *UnitOfWork) PullImage()
- func (uow *UnitOfWork) Push()
- func (uow *UnitOfWork) RequiredNetworks() []string
- func (uow *UnitOfWork) RequiredVolumes() []string
- func (uow *UnitOfWork) Rm(force bool)
- func (uow *UnitOfWork) Run(cmds []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) TargetedInfo() []ContainerInfo
- func (uow *UnitOfWork) Unpause()
- type Volume
- type VolumeMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildParameters ¶
type BuildParameters struct { RawContext string `json:"context" yaml:"context"` RawFile string `json:"file" yaml:"file"` RawBuildArgs interface{} `json:"build-arg" yaml:"build-arg"` }
func (BuildParameters) BuildArgs ¶
func (b BuildParameters) BuildArgs() []string
func (BuildParameters) Context ¶
func (b BuildParameters) Context() string
func (BuildParameters) File ¶
func (b BuildParameters) File() string
type Config ¶
type Config interface { DependencyMap() map[string]*Dependencies ContainersForReference(reference string) (result []string) Path() string UniqueID() string Prefix() string Tag() string NetworkNames() []string VolumeNames() []string Network(name string) Network Volume(name string) Volume ContainerMap() ContainerMap Container(name string) Container ContainerInfo(name string) ContainerInfo }
type Container ¶
type Container interface { ContainerInfo Exists() bool InstancesOfStatus(status string) []string Status() [][]string Provision(nocache bool) PullImage() Create(cmds []string) Run(cmds []string) Start() Kill() Stop() Pause() Unpause() Exec(cmds []string) Rm(force bool) Logs(follow bool, since string, tail string) (sources []LogSource) Push() SetCommandsOutput(stdout, stderr io.Writer) CommandsOut() io.Writer CommandsErr() io.Writer }
type ContainerInfo ¶
type ContainerInfo interface { Name() string PrefixedName() string ActualName() string Image() string ID() string Dependencies() *Dependencies Unique() bool BuildParams() BuildParameters RunParams() RunParameters RmParams() RmParameters StartParams() StartParameters ExecParams() ExecParameters 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, parallel int)
Provision containers.
func (Containers) Reversed ¶
func (containers Containers) Reversed() Containers
type Dependencies ¶
type Dependencies struct { All []string Requires []string Link []string VolumesFrom []string Net string IPC string }
Dependencies contains 4 fields: all: contains all dependencies requires: containers that need to be running link: containers linked to volumesFrom: containers that provide volumes net: container the net stack is shared with
type ExecParameters ¶
type ExecParameters struct { Detach bool `json:"detach" yaml:"detach"` RawDetachKeys string `json:"detach-keys" yaml:"detach-keys"` Interactive bool `json:"interactive" yaml:"interactive"` Privileged bool `json:"privileged" yaml:"privileged"` Tty bool `json:"tty" yaml:"tty"` RawUser string `json:"user" yaml:"user"` }
func (ExecParameters) DetachKeys ¶
func (e ExecParameters) DetachKeys() string
func (ExecParameters) User ¶
func (e ExecParameters) User() string
type NetworkMap ¶
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"` RawBlkioWeightDevice []string `json:"blkio-weight-device" yaml:"blkio-weight-device"` 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"` RawDetachKeys string `json:"detach-keys" yaml:"detach-keys"` RawDevice []string `json:"device" yaml:"device"` RawDeviceReadBps []string `json:"device-read-bps" yaml:"device-read-bps"` RawDeviceReadIops []string `json:"device-read-iops" yaml:"device-read-iops"` RawDeviceWriteBps []string `json:"device-write-bps" yaml:"device-write-bps"` RawDeviceWriteIops []string `json:"device-rewritead-iops" yaml:"device-write-iops"` RawDNS []string `json:"dns" yaml:"dns"` RawDNSOpt []string `json:"dns-opt" yaml:"dns-opt"` RawDNSSearch []string `json:"dns-search" yaml:"dns-search"` 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"` RawGroupAdd []string `json:"group-add" yaml:"group-add"` RawHostname string `json:"hostname" yaml:"hostname"` Interactive bool `json:"interactive" yaml:"interactive"` RawIp string `json:"ip" yaml:"ip"` RawIp6 string `json:"ip6" yaml:"ip6"` RawIPC string `json:"ipc" yaml:"ipc"` RawIsolation string `json:"isolation" yaml:"isolation"` RawKernelMemory string `json:"kernel-memory" yaml:"kernel-memory"` 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"` RawMemoryReservation string `json:"memory-reservation" yaml:"memory-reservation"` RawMemorySwap string `json:"memory-swap" yaml:"memory-swap"` MemorySwappiness OptInt `json:"memory-swappiness" yaml:"memory-swappiness"` RawNet string `json:"net" yaml:"net"` RawNetAlias []string `json:"net-alias" yaml:"net-alias"` OomKillDisable bool `json:"oom-kill-disable" yaml:"oom-kill-disable"` RawOomScoreAdj string `json:"oom-score-adj" yaml:"oom-score-adj"` 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"` RawShmSize string `json:"shm-size" yaml:"shm-size"` SigProxy OptBool `json:"sig-proxy" yaml:"sig-proxy"` RawStopSignal string `json:"stop-signal" yaml:"stop-signal"` RawTmpfs []string `json:"tmpfs" yaml:"tmpfs"` 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"` RawVolumeDriver string `json:"volume-driver" yaml:"volume-driver"` RawVolumesFrom []string `json:"volumes-from" yaml:"volumes-from"` RawWorkdir string `json:"workdir" yaml:"workdir"` RawCmd interface{} `json:"cmd" yaml:"cmd"` }
func (RunParameters) ActualNet ¶
func (r RunParameters) ActualNet() string
func (RunParameters) ActualVolume ¶
func (r RunParameters) ActualVolume() []string
func (RunParameters) AddHost ¶ added in v0.12.0
func (r RunParameters) AddHost() []string
func (RunParameters) BlkioWeightDevice ¶
func (r RunParameters) BlkioWeightDevice() []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) DNS ¶
func (r RunParameters) DNS() []string
func (RunParameters) DNSOpt ¶
func (r RunParameters) DNSOpt() []string
func (RunParameters) DNSSearch ¶
func (r RunParameters) DNSSearch() []string
func (RunParameters) DetachKeys ¶
func (r RunParameters) DetachKeys() string
func (RunParameters) Device ¶ added in v0.12.0
func (r RunParameters) Device() []string
func (RunParameters) DeviceReadBps ¶
func (r RunParameters) DeviceReadBps() []string
func (RunParameters) DeviceReadIops ¶
func (r RunParameters) DeviceReadIops() []string
func (RunParameters) DeviceWriteBps ¶
func (r RunParameters) DeviceWriteBps() []string
func (RunParameters) DeviceWriteIops ¶
func (r RunParameters) DeviceWriteIops() []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) GroupAdd ¶
func (r RunParameters) GroupAdd() []string
func (RunParameters) Hostname ¶
func (r RunParameters) Hostname() string
func (RunParameters) IPC ¶
func (r RunParameters) IPC() string
func (RunParameters) Ip ¶
func (r RunParameters) Ip() string
func (RunParameters) Ip6 ¶
func (r RunParameters) Ip6() string
func (RunParameters) Isolation ¶
func (r RunParameters) Isolation() string
func (RunParameters) KernelMemory ¶
func (r RunParameters) KernelMemory() 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) MemoryReservation ¶
func (r RunParameters) MemoryReservation() string
func (RunParameters) MemorySwap ¶ added in v1.1.0
func (r RunParameters) MemorySwap() string
func (RunParameters) Net ¶
func (r RunParameters) Net() string
func (RunParameters) NetAlias ¶
func (r RunParameters) NetAlias() []string
func (RunParameters) OomScoreAdj ¶
func (r RunParameters) OomScoreAdj() 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) ShmSize ¶
func (r RunParameters) ShmSize() string
func (RunParameters) StopSignal ¶
func (r RunParameters) StopSignal() string
func (RunParameters) Tmpfs ¶
func (r RunParameters) Tmpfs() []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() []string
func (RunParameters) VolumeDriver ¶
func (r RunParameters) VolumeDriver() string
func (RunParameters) VolumeSources ¶
func (r RunParameters) VolumeSources() []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 StartParameters struct { Attach bool `json:"attach" yaml:"attach"` RawDetachKeys string `json:"detach-keys" yaml:"detach-keys"` Interactive bool `json:"interactive" yaml:"interactive"` }
func (StartParameters) DetachKeys ¶
func (s StartParameters) DetachKeys() string
type StatusError ¶
type StatusError struct {
// contains filtered or unexported fields
}
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
func NewTarget ¶
func NewTarget(dependencyMap map[string]*Dependencies, targetFlag 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(dependencyMap map[string]*Dependencies, targeted []string) (uow *UnitOfWork, err error)
func (*UnitOfWork) Associated ¶
func (uow *UnitOfWork) Associated() []string
func (*UnitOfWork) Containers ¶
func (uow *UnitOfWork) Containers() Containers
func (*UnitOfWork) Exec ¶
func (uow *UnitOfWork) Exec(cmds []string)
func (*UnitOfWork) Generate ¶
func (uow *UnitOfWork) Generate(templateFile string, output string)
Generate files.
func (*UnitOfWork) Provision ¶
func (uow *UnitOfWork) Provision(noCache bool, parallel int)
Provision containers.
func (*UnitOfWork) RequiredNetworks ¶
func (uow *UnitOfWork) RequiredNetworks() []string
func (*UnitOfWork) RequiredVolumes ¶
func (uow *UnitOfWork) RequiredVolumes() []string
func (*UnitOfWork) Run ¶
func (uow *UnitOfWork) Run(cmds []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
func (*UnitOfWork) TargetedInfo ¶
func (uow *UnitOfWork) TargetedInfo() []ContainerInfo
Click to show internal directories.
Click to hide internal directories.