bus

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

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

event bus

func NewEventBus

func NewEventBus() *EventBus

new a event bus

func (*EventBus) Publish

func (b *EventBus) Publish(topic string, msg interface{}) error

func (*EventBus) Subscribe

func (b *EventBus) Subscribe(topic string) *Sub

func (*EventBus) Unsubscribe

func (b *EventBus) Unsubscribe(topic string, sub *Sub)

type Sub

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

func NewSub

func NewSub() *Sub

func (*Sub) Out

func (sub *Sub) Out() interface{}

func (*Sub) Receive

func (sub *Sub) Receive() <-chan interface{}

type SubNode

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

func NewSubNode

func NewSubNode() *SubNode

func (*SubNode) Len

func (n *SubNode) Len() int

Jump to

Keyboard shortcuts

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