eventbus

package
v0.0.0-...-fc135a5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

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

func New

func New() *Bus

func (*Bus) Publish

func (bus *Bus) Publish(topic Topic, data interface{})

func (*Bus) Subscribe

func (bus *Bus) Subscribe(topic Topic, subscriber Subscriber)

func (*Bus) UnSubscribe

func (bus *Bus) UnSubscribe(topic Topic, subscriber Subscriber)

type Message

type Message struct {
	Topic Topic
	Data  interface{}
}

type Subscriber

type Subscriber chan Message

type Topic

type Topic string

Jump to

Keyboard shortcuts

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