dispatcher

package
v0.0.0-...-4828a9b Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(action interface{})

Dispatch dispatches the given action to all registered callbacks.

func Unregister

func Unregister(id ID)

Unregister unregisters the callback previously registered via a call to Register.

Types

type ID

type ID int

ID is a unique identifier representing a registered callback function.

func Register

func Register(callback func(action interface{})) ID

Register registers the callback to handle dispatched actions, the returned ID may be used to unregister the callback later.

Jump to

Keyboard shortcuts

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