dispatcher

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher[K comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[K cmp.Ordered](options *Options) *Dispatcher[K]

func (*Dispatcher[K]) Dispatch

func (d *Dispatcher[K]) Dispatch(serialID K, functor func()) error

func (*Dispatcher[K]) Stop

func (d *Dispatcher[K]) Stop()

type Options

type Options struct {
	// number of goroutines to be spawned by this dispatcher instance
	GoroutineCount uint16

	// max number of pending events for each goroutine queue
	QueueLength uint16

	// whether to log event lifecycle
	EnableLogging bool
}

Jump to

Keyboard shortcuts

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