Documentation ¶
Index ¶
- Constants
- func GetEventArgsAsStrings(result []string, generic []interface{}) error
- func GetRecorder() events.EventRecorder
- func SetRecorder(recorder events.EventRecorder)
- func SetRecorderForTest(recorder events.EventRecorder)
- type AllStates
- type ApplicationEvent
- type ApplicationEventType
- type ApplicationStates
- type ApplicationStatusEvent
- type MockedRecorder
- func (mr *MockedRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, ...)
- func (mr *MockedRecorder) Event(object runtime.Object, eventtype, reason, message string)
- func (mr *MockedRecorder) Eventf(regarding runtime.Object, related runtime.Object, ...)
- func (mr *MockedRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, ...)
- type NodeStates
- type SchedulerEvent
- type SchedulerEventType
- type SchedulerNodeEvent
- type SchedulerNodeEventType
- type SchedulerStates
- type SchedulingEvent
- type TaskEvent
- type TaskEventType
- type TaskStates
Constants ¶
View Source
const EnterState = "enter_state"
Variables ¶
This section is empty.
Functions ¶
func GetEventArgsAsStrings ¶
func GetRecorder ¶
func GetRecorder() events.EventRecorder
func SetRecorder ¶
func SetRecorder(recorder events.EventRecorder)
func SetRecorderForTest ¶
func SetRecorderForTest(recorder events.EventRecorder)
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" TryReserve ApplicationEventType = "TryReserve" UpdateReservation ApplicationEventType = "UpdateReservation" RunApplication ApplicationEventType = "RunApplication" RejectApplication ApplicationEventType = "RejectApplication" CompleteApplication ApplicationEventType = "CompleteApplication" FailApplication ApplicationEventType = "FailApplication" KillApplication ApplicationEventType = "KillApplication" KilledApplication ApplicationEventType = "KilledApplication" ReleaseAppAllocation ApplicationEventType = "ReleaseAppAllocation" ReleaseAppAllocationAsk ApplicationEventType = "ReleaseAppAllocationAsk" AppStateChange ApplicationEventType = "ApplicationStateChange" ResumingApplication ApplicationEventType = "ResumingApplication" AppTaskCompleted ApplicationEventType = "AppTaskCompleted" )
type ApplicationStates ¶
type ApplicationStatusEvent ¶
type ApplicationStatusEvent interface {
GetState() string
}
------------------------ ApplicationStatusEvent updates the status in the application CRD ------------------------
type MockedRecorder ¶
type MockedRecorder struct {
OnEventf func()
}
func NewMockedRecorder ¶
func NewMockedRecorder() *MockedRecorder
func (*MockedRecorder) AnnotatedEventf ¶
func (*MockedRecorder) Event ¶
func (mr *MockedRecorder) Event(object runtime.Object, eventtype, reason, message string)
func (*MockedRecorder) PastEventf ¶
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" DrainNode SchedulerNodeEventType = "DrainNode" RestoreNode SchedulerNodeEventType = "RestoreNode" NodeReady SchedulerNodeEventType = "NodeReady" )
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 ( InitTask TaskEventType = "InitTask" SubmitTask TaskEventType = "SubmitTask" TaskAllocated TaskEventType = "TaskAllocated" TaskRejected TaskEventType = "TaskRejected" TaskBound TaskEventType = "TaskBound" CompleteTask TaskEventType = "CompleteTask" TaskFail TaskEventType = "TaskFail" KillTask TaskEventType = "KillTask" TaskKilled TaskEventType = "TaskKilled" )
type TaskStates ¶
Click to show internal directories.
Click to hide internal directories.