events

package
v0.0.0-...-06c96c1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(topic string, args ...interface{})

Publish executes callback defined for a topic. Any additional argument will be transferred to the callback.

func SubscribeAsync

func SubscribeAsync(topic string, fn interface{})

SubscribeAsync subscribes to a topic with an asynchronous callback Subsequent callbacks for a topic are run concurrently Does nothing if fn is not a function.

func SubscribeOnceAsync

func SubscribeOnceAsync(topic string, fn interface{})

SubscribeOnceAsync subscribes to a topic once with an asynchronous callback Handler will be removed after executing. Does nothing if fn is not a function.

func Unsubscribe

func Unsubscribe(topic string, handler interface{})

Unsubscribe removes callback defined for a topic if it exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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