eventBus

package
v0.0.0-...-31e18c8 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetBus

func SetBus(bus Bus)

Types

type Bus

type Bus interface {
	Subscribe(topic Topic, fn BusHandler) error
	Unsubscribe(topic Topic, handler BusHandler) error
	Publish(topic Topic, arg interface{})
}

func GetBus

func GetBus() Bus

type BusHandler

type BusHandler func(arg interface{})

type Name

type Name string

type NullBus

type NullBus struct{}

func (NullBus) Publish

func (NullBus) Publish(topic Topic, arg interface{})

func (NullBus) Subscribe

func (NullBus) Subscribe(topic Topic, fn BusHandler) error

func (NullBus) Unsubscribe

func (NullBus) Unsubscribe(topic Topic, handler BusHandler) error

type Topic

type Topic string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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