event

package
v0.0.0-...-83fd405 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoHandler = errors.New("no handler")

Functions

This section is empty.

Types

type Dispatcher

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

func NewDispatcher

func NewDispatcher() *Dispatcher

func (*Dispatcher) Dispatch

func (m *Dispatcher) Dispatch(iEvent IEvent, ctx actor.Context, args ...interface{}) (err error)

func (*Dispatcher) Register

func (m *Dispatcher) Register(id ID, h Handler)

type Handler

type Handler func(iEvent IEvent, ctx actor.Context, args ...interface{})

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

type ID

type ID = uint16

type IEvent

type IEvent interface {
	Event()
	EventID() ID
}

Jump to

Keyboard shortcuts

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