Documentation ¶
Index ¶
- func GetEventArgsAsStrings(result []string, generic []interface{}) error
- type AllStates
- type ApplicationEvent
- type ApplicationEventType
- type ApplicationStates
- type NodeStates
- type SchedulerEvent
- type SchedulerEventType
- type SchedulerNodeEvent
- type SchedulerNodeEventType
- type SchedulerStates
- type SchedulingEvent
- type TaskEvent
- type TaskEventType
- type TaskStates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEventArgsAsStrings ¶
Types ¶
type AllStates ¶
type AllStates struct { Application *ApplicationStates Task *TaskStates Scheduler *SchedulerStates Node *NodeStates }
type ApplicationEvent ¶
type ApplicationEvent interface { // an application event is associated with an application Id, // dispatcher finds out actual application based on this id // to handle this event GetApplicationId() string // the type of this event GetEvent() ApplicationEventType // an event can have multiple arguments, these arguments will be passed to // state machines' callbacks when doing state transition GetArgs() []interface{} }
type ApplicationEventType ¶
type ApplicationEventType string
---------------------------------------------- Application events ----------------------------------------------
const ( SubmitApplication ApplicationEventType = "SubmitApplication" RecoverApplication ApplicationEventType = "RecoverApplication" AcceptApplication ApplicationEventType = "AcceptApplication" RunApplication ApplicationEventType = "RunApplication" RejectApplication ApplicationEventType = "RejectApplication" CompleteApplication ApplicationEventType = "CompleteApplication" FailApplication ApplicationEventType = "FailApplication" KillApplication ApplicationEventType = "KillApplication" KilledApplication ApplicationEventType = "KilledApplication" )
type ApplicationStates ¶
type NodeStates ¶
type SchedulerEvent ¶
type SchedulerEvent interface { // the type of this event GetEvent() SchedulerEventType // an event can have multiple arguments, these arguments will be passed to // state machines' callbacks when doing state transition GetArgs() []interface{} }
type SchedulerEventType ¶
type SchedulerEventType string
-------------------------------------- scheduler events --------------------------------------
const ( RegisterScheduler SchedulerEventType = "RegisterScheduler" RegisterSchedulerSucceed SchedulerEventType = "RegisterSchedulerSucceed" RegisterSchedulerFailed SchedulerEventType = "RegisterSchedulerFailed" RecoverScheduler SchedulerEventType = "RecoverScheduler" RecoverSchedulerSucceed SchedulerEventType = "RecoverSchedulerSucceed" RecoverSchedulerFailed SchedulerEventType = "RecoverSchedulerFailed" )
type SchedulerNodeEvent ¶
type SchedulerNodeEvent interface { // returns the node Id GetNodeId() string // the type of this event GetEvent() SchedulerNodeEventType // an event can have multiple arguments, these arguments will be passed to // state machines' callbacks when doing state transition GetArgs() []interface{} }
type SchedulerNodeEventType ¶
type SchedulerNodeEventType string
-------------------------------------- scheduler node events --------------------------------------
const ( RecoverNode SchedulerNodeEventType = "RecoverNode" NodeAccepted SchedulerNodeEventType = "NodeAccepted" NodeRejected SchedulerNodeEventType = "NodeRejected" )
type SchedulerStates ¶
type SchedulingEvent ¶
type SchedulingEvent interface {
GetArgs() []interface{}
}
---------------------------------------------- General event interface ----------------------------------------------
type TaskEvent ¶
type TaskEvent interface { // application id which this task belongs to GetApplicationId() string // a task event must be associated with an application id // and a task id, dispatcher need them to dispatch this event // to the actual task GetTaskId() string // type of this event GetEvent() TaskEventType // an event can have multiple arguments, these arguments will be passed to // state machines' callbacks when doing state transition GetArgs() []interface{} }
type TaskEventType ¶
type TaskEventType string
---------------------------------------------- Task events ----------------------------------------------
const ( SubmitTask TaskEventType = "SubmitTask" TaskAllocated TaskEventType = "TaskAllocated" TaskRejected TaskEventType = "TaskRejected" TaskBound TaskEventType = "TaskBound" CompleteTask TaskEventType = "CompleteTask" TaskFail TaskEventType = "TaskFail" KillTask TaskEventType = "KillTask" TaskKilled TaskEventType = "TaskKilled" )
Click to show internal directories.
Click to hide internal directories.