dispatcher

package
v0.0.0-...-f394a37 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(event events.SchedulingEvent)

dispatches scheduler events to actual app/task handler, each app/task has its own state machine and maintain their own states. currently all events share same channel, so they are dispatched one by one in order.

func RegisterEventHandler

func RegisterEventHandler(eventType EventType, handlerFn func(interface{}))

func Start

func Start()

func Stop

func Stop()

stop the dispatcher and wait at most 5 seconds gracefully

Types

type Dispatcher

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

central dispatcher that dispatches scheduling events.

type EventType

type EventType int8
const (
	EventTypeApp EventType = iota
	EventTypeTask
	EventTypeNode
	EventTypeScheduler
)

Jump to

Keyboard shortcuts

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