Documentation
¶
Index ¶
- func NewContainerShellSession(ctr *Container) *shellsession.ShellSession
- type AppliedAction
- type BlueGreenMode
- type Container
- func (set *Container) Attach(wg *sync.WaitGroup) error
- func (set *Container) BlueGreenCopy() (newCon *Container)
- func (set *Container) BlueGreenDeploy(attach bool, dryRun bool, wg *sync.WaitGroup) error
- func (set *Container) BuildImage() error
- func (set *Container) Create(dryRun bool) error
- func (set *Container) GetRunArguments() []interface{}
- func (set *Container) IPs() string
- func (set *Container) Kill(args []string) error
- func (set *Container) Logs() (*sh.Session, error)
- func (set *Container) NewName()
- func (set *Container) RecreateAndRun(attach bool, dryRun bool, wg *sync.WaitGroup) error
- func (set *Container) Restart(args []string) error
- func (set *Container) Rm(args []string) error
- func (set *Container) Run(attach bool, dryRun bool, wg *sync.WaitGroup) error
- func (set *Container) Start(attach bool, wg *sync.WaitGroup) error
- func (set *Container) Stop(args []string) error
- type Hook
- type Hooks
- type Link
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContainerShellSession ¶
func NewContainerShellSession(ctr *Container) *shellsession.ShellSession
Types ¶
type AppliedAction ¶
type AppliedAction string
const ( Run AppliedAction = "run" Start AppliedAction = "start" Stop AppliedAction = "stop" Kill AppliedAction = "kill" Restart AppliedAction = "restart" Remove AppliedAction = "remove" )
type BlueGreenMode ¶
type BlueGreenMode int
const ( BGModeOff BlueGreenMode = iota BGModeOn BGModeUnknown )
type Container ¶
type Container struct {
// Container name
Name string
// name of service (not including number)
ServiceName string
// non unique service id, eg the first col in config, "mongo" or "php"
ServiceType string
// the order defined in the config output
Placement int
// arguments to container
ContainerArgs []string
// image to use
Image string
// if supplied will do docker build on this path
Build string
// The arguments for the build command
BuildArgs []string
// command for container
Command []string
// links
Links []Link
// volumes from list
VolumesFrom []string
// hooks map for this definition
Hooks Hooks
// used in commands
Action AppliedAction
// the total number of containers to scale to.
Scale int
// the arguments for docker run / create
RunArguments []interface{}
// the project name
ProjectName string
// the project name separator, usually "_"
ProjectNameSeparator string
// the number of this container, relates to scale
InstanceNumber int
// Rm command given, therefore dont run as daemon
Remove bool
// Whether or not Blue/Green mode is enabled for this container
BlueGreenMode BlueGreenMode
// Is this container enabled or not
Enabled bool
// The current state of the container
State *helpers.ServiceState
}
func (*Container) BlueGreenCopy ¶
func (*Container) BlueGreenDeploy ¶
func (*Container) BuildImage ¶
Builds an image for a container
func (*Container) GetRunArguments ¶
func (set *Container) GetRunArguments() []interface{}
Create docker arg slice from container options
func (*Container) RecreateAndRun ¶
type Hook ¶
type Hook struct {
Scripts []string
Ses *shellsession.ShellSession
}
Click to show internal directories.
Click to hide internal directories.