types

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequestError

type BadRequestError struct {
	// contains filtered or unexported fields
}

func NewBadRequestError

func NewBadRequestError(err error) BadRequestError

type Deployment

type Deployment struct {
	ID               string
	Status           DeploymentStatus
	Health           DeploymentHealth
	TaskDefinition   string
	DesiredTaskCount int
	Token            string

	FailedInstances []*ecs.Failure
	StartTime       time.Time
	EndTime         time.Time
}

func NewDeployment

func NewDeployment(taskDefinition string, token string) (*Deployment, error)

func (*Deployment) UpdateDeploymentToCompleted added in v0.2.0

func (d *Deployment) UpdateDeploymentToCompleted(failedInstances []*ecs.Failure) error

func (*Deployment) UpdateDeploymentToInProgress added in v0.2.0

func (d *Deployment) UpdateDeploymentToInProgress(
	desiredTaskCount int,
	failedInstances []*ecs.Failure) error

type DeploymentHealth

type DeploymentHealth uint8
const (
	DeploymentHealthy DeploymentHealth = iota
	DeploymentUnhealthy
)

type DeploymentStatus

type DeploymentStatus uint8
const (
	DeploymentPending DeploymentStatus = iota
	DeploymentInProgress
	DeploymentCompleted
)

type Environment

type Environment struct {
	Token                 string
	Name                  string
	DesiredTaskDefinition string
	DesiredTaskCount      int
	Cluster               string
	Health                EnvironmentHealth

	// ID of the deployment created by the latest create-deployment call.
	PendingDeploymentID string
	// ID of the deployment that is currently in-progress. Background workers will pick
	// up this deployment to launch tasks on new instances if there is an in-progress deployment.
	// Otherwise, if no in-progress deployment exists, background workers pick up the latest completed deployment.
	InProgressDeploymentID string

	// deploymentID -> deployment
	Deployments map[string]Deployment
}

func NewEnvironment

func NewEnvironment(name string, taskDefinition string, cluster string) (*Environment, error)

func (*Environment) AddPendingDeployment added in v0.2.0

func (e *Environment) AddPendingDeployment(d Deployment) error

func (*Environment) SortDeploymentsReverseChronologically added in v0.2.0

func (e *Environment) SortDeploymentsReverseChronologically() ([]Deployment, error)

SortDeploymentsReverseChronologically returns deployments ordered reverse-chronologically: latest startTime first

func (*Environment) UpdatePendingDeploymentToInProgress added in v0.2.0

func (e *Environment) UpdatePendingDeploymentToInProgress() error

type EnvironmentFacade added in v0.2.0

type EnvironmentFacade interface {
	InstanceARNs(environment *Environment) ([]*string, error)
}

func NewEnvironmentFacade added in v0.2.0

func NewEnvironmentFacade(css facade.ClusterState) (EnvironmentFacade, error)

type EnvironmentHealth

type EnvironmentHealth uint8
const (
	EnvironmentHealthy EnvironmentHealth = iota
	EnvironmentUnhealthy
)

type MockEnvironmentFacade added in v0.2.0

type MockEnvironmentFacade struct {
	// contains filtered or unexported fields
}

Mock of EnvironmentFacade interface

func NewMockEnvironmentFacade added in v0.2.0

func NewMockEnvironmentFacade(ctrl *gomock.Controller) *MockEnvironmentFacade

func (*MockEnvironmentFacade) EXPECT added in v0.2.0

func (_m *MockEnvironmentFacade) EXPECT() *_MockEnvironmentFacadeRecorder

func (*MockEnvironmentFacade) InstanceARNs added in v0.2.0

func (_m *MockEnvironmentFacade) InstanceARNs(environment *Environment) ([]*string, error)

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func NewNotFoundError

func NewNotFoundError(err error) NotFoundError

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL