Documentation ¶
Index ¶
- Constants
- func NewDispatcher(ctx context.Context, environmentSvc deployment.Environment, ...) *dispatcher
- func NewScheduler(ctx context.Context, events chan<- Event, ...) *scheduler
- type ErrorEvent
- type Event
- type EventType
- type Monitor
- type MonitorErrorEvent
- type SchedulerEnvironmentEvent
- type SchedulerErrorEvent
- type StartDeploymentEvent
- type StartDeploymentResult
- type StartPendingDeploymentEvent
- type StartPendingDeploymentResult
- type StopTasksEvent
- type StopTasksResult
- type UpdateInProgressDeploymentEvent
Constants ¶
const ( InProgressMonitorTickerDuration = 10 * time.Second PendingMonitorTickerDuration = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶ added in v0.2.0
func NewDispatcher(ctx context.Context, environmentSvc deployment.Environment, deploymentSvc deployment.Deployment, ecs facade.ECS, css facade.ClusterState, deploymentWorker deployment.DeploymentWorker, input <-chan Event, output chan<- Event) *dispatcher
func NewScheduler ¶
func NewScheduler(ctx context.Context, events chan<- Event, environmentSvc deployment.Environment, deploymentSvc deployment.Deployment, css facade.ClusterState, ecs facade.ECS) *scheduler
NewScheduler creates a scheduler instance with clean execution state. There should be only one instance of this running on a host.
Types ¶
type ErrorEvent ¶ added in v0.2.0
type ErrorEvent struct {
Error error
}
ErrorEvent is generic event to notify of errors across actors
func (ErrorEvent) GetType ¶ added in v0.2.0
func (e ErrorEvent) GetType() EventType
type EventType ¶
type EventType string
const ( StartDeploymentEventType EventType = "StartDeploymentEvent" StopTasksEventType EventType = "StopTasksEvent" SchedulerErrorEventType EventType = "SchedulerErrorEvent" SchedulerEnvironmentEventType EventType = "SchedulerEnvironmentEvent" ErrorEventType EventType = "ErrorEventType" StopTasksResultType EventType = "StopTasksResultType" StartDeploymentResultType EventType = "StartDeploymentResultType" StartPendingDeploymentResultType EventType = "StartPendingDeploymentResultType" MonitorErrorEventType EventType = "MonitorErrorEventType" UpdateInProgressDeploymentEventType EventType = "UpdateInProgressDeploymentEvent" StartPendingDeploymentEventType EventType = "StartPendingDeploymentEvent" )
type Monitor ¶
type Monitor interface { PendingMonitorLoop(tickerDuration time.Duration) InProgressMonitorLoop(tickerDuration time.Duration) }
func NewMonitor ¶
func NewMonitor( ctx context.Context, environment deployment.Environment, events chan<- Event) Monitor
type MonitorErrorEvent ¶ added in v0.2.0
type MonitorErrorEvent struct {
Error error
}
MonitorErrorEvent is message used to notify of any execution errors from Monitor
func (MonitorErrorEvent) GetType ¶ added in v0.2.0
func (e MonitorErrorEvent) GetType() EventType
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 ¶
func (e SchedulerEnvironmentEvent) GetType() EventType
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 StartDeploymentResult ¶ added in v0.2.0
type StartDeploymentResult struct {
Deployment types.Deployment
}
StartDeploymentResult is result of StartDeploymentEvent action
func (StartDeploymentResult) GetType ¶ added in v0.2.0
func (e StartDeploymentResult) GetType() EventType
type StartPendingDeploymentEvent ¶ added in v0.2.0
type StartPendingDeploymentEvent struct {
Environment types.Environment
}
func (StartPendingDeploymentEvent) GetType ¶ added in v0.2.0
func (e StartPendingDeploymentEvent) GetType() EventType
type StartPendingDeploymentResult ¶ added in v0.2.0
type StartPendingDeploymentResult struct {
Deployment types.Deployment
}
StartPendingDeploymentResult is result of StartPendingDeploymentEvent action
func (StartPendingDeploymentResult) GetType ¶ added in v0.2.0
func (e StartPendingDeploymentResult) 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 StopTasksResult ¶ added in v0.2.0
type StopTasksResult struct {
StoppedTasks []string
}
StopTasksResult is result of stop tasks action
func (StopTasksResult) GetType ¶ added in v0.2.0
func (e StopTasksResult) GetType() EventType
type UpdateInProgressDeploymentEvent ¶
type UpdateInProgressDeploymentEvent struct {
Environment types.Environment
}
func (UpdateInProgressDeploymentEvent) GetType ¶
func (e UpdateInProgressDeploymentEvent) GetType() EventType