Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrorEmptyHistory = errors.New("container history is empty")
var ErrorLaunchConfigNotFound = fmt.Errorf("launch configuration not found")
Functions ¶
This section is empty.
Types ¶
type ContainerHistory ¶
type ContainerHistory struct { Events []*ContainerHistoryEvent MaxSize int // contains filtered or unexported fields }
A datastructure to manage the most recent containers that are/have been deployed. Including pointers to the launch configurations that were used for them.
func LoadContainerHistory ¶
func LoadContainerHistory(s3c *s3.Client, bucket, prefix string) (*ContainerHistory, error)
Load the container history from S3.
func (*ContainerHistory) Add ¶
func (ch *ContainerHistory) Add(lc *LaunchConfig) (*ContainerHistoryEvent, error)
Add a new entry to the history. This will add a new launch configuration and persist the launch configuration itself to S3. After a successful deployment (not part of this package) the changed history should be persisted, so that rollback and restart can rely on the current information.
func (*ContainerHistory) RollbackTo ¶
func (ch *ContainerHistory) RollbackTo(che *ContainerHistoryEvent) (*ContainerHistoryEvent, error)
Rollback to the container in the given history event. The history is changed to only contain events up to the given one, i.e. all successors are removed. Please note an explicit history.Save call must be done to persist the changed history.
func (*ContainerHistory) Save ¶
func (ch *ContainerHistory) Save() error
Persist the container history to S3.
type ContainerHistoryEvent ¶
type ContainerHistoryEvent struct { Revision string DeployedAt time.Time DeployedBy string Hash string // contains filtered or unexported fields }
func (*ContainerHistoryEvent) Load ¶
func (che *ContainerHistoryEvent) Load() (*LaunchConfig, error)
Load the event's container configuration from S3.
type ContainerManager ¶
type ContainerManager struct { S3Bucket string S3Prefix string Proxy *Proxy RegistryPort int AppName string // contains filtered or unexported fields }
func NewContainerManager ¶
func (*ContainerManager) StartContainer ¶
func (cm *ContainerManager) StartContainer(hash string) (string, int, error)
func (*ContainerManager) Stats ¶
func (cm *ContainerManager) Stats(stats map[string]interface{}) error
func (*ContainerManager) StopOldContainers ¶
func (cm *ContainerManager) StopOldContainers() error
func (*ContainerManager) SwitchContainer ¶
func (cm *ContainerManager) SwitchContainer(hash string) (string, int, error)
type LaunchConfig ¶
type LaunchConfig struct { ContainerConfig *docker.ContainerConfig HostConfig *docker.HostConfig HealthCheckPath string Revision string ForceReload bool // contains filtered or unexported fields }
The launch configuration contains all the information required to start a container with the required environment, including all the environment variables required (like credentials).
func LoadCurrentLaunchConfig ¶
func LoadCurrentLaunchConfig(s3c *s3.Client, bucket, prefix string) (*LaunchConfig, error)
Function to load the currently deployed container for the environment specified in the prefix. If history is empty the ErrorLaunchConfigNotFound error type will be returned.
func LoadLaunchConfig ¶
func LoadLaunchConfig(s3c *s3.Client, bucket, prefix, hash string) (*LaunchConfig, error)
Function to load a given launch configuration from S3. This must be a public method to be able to load it when first deploying it (its not part of the history right then).
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Godeps/_workspace/src/github.com/dynport/dgtk/cli
golang CLI parameter handling
|
golang CLI parameter handling |
Godeps/_workspace/src/github.com/dynport/dgtk/dockerclient
A docker client library.
|
A docker client library. |
Godeps/_workspace/src/github.com/dynport/dgtk/dockerclient/docker
docker related datastructures.
|
docker related datastructures. |
Godeps/_workspace/src/github.com/dynport/dgtk/tagparse
Package to parse a tag.
|
Package to parse a tag. |
Godeps/_workspace/src/golang.org/x/crypto/curve25519
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
|
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519. |
Godeps/_workspace/src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
|
Package ssh implements an SSH client and server. |
Godeps/_workspace/src/golang.org/x/crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
|
Package agent implements a client to an ssh-agent daemon. |
Godeps/_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
|
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems. |
Godeps/_workspace/src/golang.org/x/crypto/ssh/test
This package contains integration tests for the golang.org/x/crypto/ssh package.
|
This package contains integration tests for the golang.org/x/crypto/ssh package. |