Documentation ¶
Index ¶
- Constants
- func RealMain()
- type AcceleratedMount
- type AcceleratedMountMap
- type BuildParameters
- type Config
- type Container
- type ContainerInfo
- type ContainerMap
- type Containers
- type Dependencies
- type HealthcheckParameters
- type Hooks
- type LogSource
- type LoggingParameters
- type Network
- type NetworkMap
- type NetworkParameters
- type OptBool
- type OptInt
- type Settings
- 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, privileged bool, user string)
- func (uow *UnitOfWork) Generate(templateFile string, output string)
- func (uow *UnitOfWork) Kill()
- 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, volumes bool)
- func (uow *UnitOfWork) Run(cmds []string, detach bool)
- func (uow *UnitOfWork) Start()
- func (uow *UnitOfWork) Stats(noStream bool)
- func (uow *UnitOfWork) Status(noTrunc bool)
- func (uow *UnitOfWork) Stop()
- func (uow *UnitOfWork) Targeted() Containers
- func (uow *UnitOfWork) TargetedInfo() []ContainerInfo
- func (uow *UnitOfWork) Unpause()
- func (uow *UnitOfWork) Up(cmds []string, detach bool, noCache bool, parallel int)
- type UpdateRequestParams
- type UpdateResponseBody
- type Volume
- type VolumeMap
Constants ¶
const Pro = false
const Version = "3.4.2"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcceleratedMount ¶
type AcceleratedMountMap ¶
type AcceleratedMountMap map[string]AcceleratedMount
type BuildParameters ¶
type BuildParameters struct { RawContext string `json:"context" yaml:"context"` RawFile string `json:"file" yaml:"file"` RawDockerfile string `json:"dockerfile" yaml:"dockerfile"` RawBuildArgs interface{} `json:"build-arg" yaml:"build-arg"` RawArgs interface{} `json:"args" yaml:"args"` }
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 Cmds() map[string][]string AcceleratedMountNames() []string Network(name string) Network Volume(name string) Volume Cmd(name string) []string AcceleratedMount(volume string) AcceleratedMount ContainerMap() ContainerMap Container(name string) Container ContainerInfo(name string) ContainerInfo }
type Container ¶
type Container interface { ContainerInfo Exists() bool Running() bool Paused() bool Status() [][]string Provision(nocache bool) PullImage() Create(cmds []string) Run(cmds []string, targeted bool, detachFlag bool) Start(targeted bool) Kill() Stop() Pause() Unpause() Exec(cmds []string, privileged bool, user string) Rm(force bool, volumes bool) Logs(follow bool, since string, tail string) (sources []LogSource) Push() SetCommandsOutput(stdout, stderr io.Writer) CommandsOut() io.Writer CommandsErr() io.Writer BindMounts(volumeNames []string) []string VolumeSources() []string Net() string Networks() map[string]NetworkParameters }
type ContainerInfo ¶
type ContainerInfo interface { Name() string PrefixedName() string ActualName(bool) string Image() string ID() string Dependencies() *Dependencies BuildParams() BuildParameters 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 HealthcheckParameters ¶
type HealthcheckParameters struct { RawTest string `json:"test" yaml:"test"` RawInterval string `json:"interval" yaml:"interval"` RawTimeout string `json:"timeout" yaml:"timeout"` Retries int `json:"retries" yaml:"retries"` Disable bool `json:"disable" yaml:"disable"` }
func (HealthcheckParameters) Interval ¶
func (h HealthcheckParameters) Interval() string
func (HealthcheckParameters) Test ¶
func (h HealthcheckParameters) Test() string
func (HealthcheckParameters) Timeout ¶
func (h HealthcheckParameters) Timeout() string
type LoggingParameters ¶
type LoggingParameters struct { RawDriver string `json:"driver" yaml:"driver"` RawOptions interface{} `json:"options" yaml:"options"` }
func (LoggingParameters) Driver ¶
func (l LoggingParameters) Driver() string
func (LoggingParameters) Options ¶
func (l LoggingParameters) Options() []string
type NetworkMap ¶
type NetworkParameters ¶
type NetworkParameters struct { RawAlias interface{} `json:"alias" yaml:"alias"` RawAliases interface{} `json:"aliases" yaml:"aliases"` RawIp string `json:"ip" yaml:"ip"` RawIpv4Address string `json:"ipv4_address" yaml:"ipv4_address"` RawIp6 string `json:"ip6" yaml:"ip6"` RawIpv6Address string `json:"ipv6_address" yaml:"ipv6_address"` }
func (NetworkParameters) Alias ¶
func (n NetworkParameters) Alias(containerName string) []string
If aliases are not defined in the config, the container name is added as a default alias. When an empty array is configured, no default alias is used.
func (NetworkParameters) Ip ¶
func (n NetworkParameters) Ip() string
func (NetworkParameters) Ip6 ¶
func (n NetworkParameters) Ip6() string
type OptBool ¶ added in v1.1.1
func (*OptBool) UnmarshalJSON ¶ added in v1.1.1
func (*OptBool) UnmarshalYAML ¶ added in v1.1.1
type Settings ¶
type Settings struct { UUID string `json:"uuid"` Version string `json:"version"` LatestVersion string `json:"latest_version"` NextUpdateCheck time.Time `json:"next_update_check"` CheckForUpdates bool `json:"check_for_updates"` // contains filtered or unexported fields }
func (*Settings) CorrectVersion ¶
If version in settings does not match version of binary, we assume that the binary was updated and update the settings file with the new information.
func (*Settings) DelayNextUpdateCheck ¶
func (*Settings) ShouldCheckForUpdates ¶
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, targetArg string, extendFlag bool) (target Target, err error)
NewTarget receives the specified target and determines which containers should be targeted. The target might be extended to dependencies if --extend is given. 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) 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, detach bool)
func (*UnitOfWork) Stats ¶
func (uow *UnitOfWork) Stats(noStream bool)
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