Documentation ¶
Index ¶
- Variables
- type Deployment
- type Event
- type Manager
- type Manifest
- type Pipeline
- func (d *Pipeline) ConnectRequiredServices(networkID string) error
- func (d *Pipeline) ContainerName() string
- func (d *Pipeline) CreateContainer() (string, error)
- func (d *Pipeline) CreateServiceNetwork() (string, error)
- func (d *Pipeline) EnsureContainerIsRunning(containerID string) error
- func (d *Pipeline) Log(v any)
- func (d *Pipeline) PullImage() error
- func (d Pipeline) Run() error
- func (d *Pipeline) RunHooks(containerID string, commands []string) error
- func (d *Pipeline) StartContainer(containerID string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrContainerNotRunning = errors.New("container is not running") ErrContainerTimeout = errors.New("container is not running (timeout)") )
View Source
var (
ErrDeploymentFailed = errors.New("deployment failed")
)
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct { ID string ServicesConfig *config.ServicesConfig Events chan Event Manifest *Manifest Logger *log.Logger Subnetter *docker.Subnetter }
func NewDeployment ¶
func NewDeployment(servicesConfig *config.ServicesConfig, logger *log.Logger, manager *Manager, subnetter *docker.Subnetter) *Deployment
func (*Deployment) Start ¶
func (d *Deployment) Start() error
type Manager ¶
type Manager struct {
Path string
}
Manager contains the path to the manifest file and methods to manage manifests.
func (Manager) NewManifest ¶
type Pipeline ¶
type Pipeline struct { Docker *docker.Client Deployment *Deployment Service *service.Service HasDependencies bool }
func (*Pipeline) ConnectRequiredServices ¶
func (*Pipeline) ContainerName ¶
func (*Pipeline) CreateContainer ¶
func (*Pipeline) CreateServiceNetwork ¶
func (*Pipeline) EnsureContainerIsRunning ¶
EnsureContainerIsRunning will wait for the container to start and then return an error if the container is not running after either : - 10 seconds if the container has no health-check - Retries * (Interval + Timeout) if the container has a health-check
todo(pipeline): return logs from failed container
func (*Pipeline) StartContainer ¶
Click to show internal directories.
Click to hide internal directories.