topic

package
v0.0.0-...-5fe69d9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Topic

type Topic struct {
	Callbacks    map[ulid.ULID]func(interface{})
	CallbacksMux *sync.RWMutex
	Channels     map[ulid.ULID]chan interface{}
	ChannelsMux  *sync.RWMutex
}

func (*Topic) RegisterCallback

func (t *Topic) RegisterCallback(id ulid.ULID, callback func(data interface{}))

func (*Topic) RegisterChannel

func (t *Topic) RegisterChannel(id ulid.ULID, channel chan interface{})

func (*Topic) Send

func (t *Topic) Send(data interface{})

func (*Topic) SendExcept

func (t *Topic) SendExcept(data interface{}, filterOutIDs map[ulid.ULID]bool)

func (*Topic) SendTo

func (t *Topic) SendTo(data interface{}, sendToIDs map[ulid.ULID]bool)

func (*Topic) UnregisterCallback

func (t *Topic) UnregisterCallback(id ulid.ULID)

func (*Topic) UnregisterChannel

func (t *Topic) UnregisterChannel(id ulid.ULID)

Jump to

Keyboard shortcuts

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