dispatcher

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AsyncDispatchLimit         int32
	AsyncDispatchCheckInterval = 3 * time.Second
	DispatchTimeout            time.Duration
)

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
	EventTypeAppStatus
)

Jump to

Keyboard shortcuts

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