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 ApplicationEvent
- 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 SchedulerNodeEvent
- type SchedulingEvent
- type TaskEvent
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 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() string // an event can have multiple arguments, these arguments will be passed to // state machines' callbacks when doing state transition GetArgs() []interface{} }
---------------------------------------------- Application events ----------------------------------------------
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 SchedulerNodeEvent ¶
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() string // an event can have multiple arguments, these arguments will be passed to // state machines' callbacks when doing state transition GetArgs() []interface{} }
---------------------------------------------- Task events ----------------------------------------------
Click to show internal directories.
Click to hide internal directories.