engine

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartDispatcher

func StartDispatcher(ctx context.Context, environmentSvc deployment.Environment,
	deploymentSvc deployment.Deployment, ecs facade.ECS, css facade.ClusterState,
	deploymentWorker deployment.DeploymentWorker) chan<- Event

StartDispatcher starts dispatcher. dispatcher listens to events on channel and forwards them to workers

Types

type Event

type Event interface {
	//GetType returns event-type
	GetType() EventType
}

type EventType

type EventType string
const (
	StartDeploymentEventType            EventType = "StartDeploymentEvent"
	StopTasksEventType                  EventType = "StopTasksEvent"
	UpdateInProgressDeploymentEventType EventType = "UpdateInProgressDeploymentEvent"
	SchedulerErrorEventType             EventType = "SchedulerErrorEvent"
	SchedulerEnvironmentEventType       EventType = "SchedulerEnvironmentEvent"
)

type Monitor

type Monitor interface {
	InProgressMonitorLoop()
}

func NewMonitor

func NewMonitor(
	ctx context.Context,
	environment deployment.Environment,
	events chan<- Event) Monitor

type Scheduler

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

Scheduler loops through all the environments and makes sure they reach their eventual state.

func NewScheduler

func NewScheduler(ctx context.Context, events chan<- Event, environmentSvc deployment.Environment,
	deploymentSvc deployment.Deployment, css facade.ClusterState, ecs facade.ECS) *Scheduler

func (*Scheduler) Start

func (scheduler *Scheduler) Start()

type SchedulerEnvironmentEvent

type SchedulerEnvironmentEvent struct {
	Environment types.Environment
	Message     string
}

SchedulerEnvironmentEvent is message used to notify of any execution errors from Scheduler

func (SchedulerEnvironmentEvent) GetType

type SchedulerErrorEvent

type SchedulerErrorEvent struct {
	Error       error
	Environment types.Environment
}

SchedulerErrorEvent is message used to notify of any execution errors from Scheduler

func (SchedulerErrorEvent) GetType

func (e SchedulerErrorEvent) GetType() EventType

type StartDeploymentEvent

type StartDeploymentEvent struct {
	Instances   []*string
	Environment types.Environment
}

StartDeploymentEvent is message used to notify actors to perform a deployment using environment

func (StartDeploymentEvent) GetType

func (e StartDeploymentEvent) GetType() EventType

type StopTasksEvent

type StopTasksEvent struct {
	Cluster     string
	Tasks       []string
	Environment types.Environment
}

StopTasksEvent is message used to notify actors to stop tasks

func (StopTasksEvent) GetType

func (e StopTasksEvent) GetType() EventType

type UpdateInProgressDeploymentEvent

type UpdateInProgressDeploymentEvent struct {
	Environment types.Environment
}

func (UpdateInProgressDeploymentEvent) GetType

Jump to

Keyboard shortcuts

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