bus

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0, MIT 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 interface {
	Subscriber
	Publisher
}

func New

func New() Bus

type EventBus

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

func (*EventBus) Publish

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

func (*EventBus) Subscribe

func (e *EventBus) Subscribe(topic string, handler interface{}) error

func (*EventBus) Unsubscribe

func (e *EventBus) Unsubscribe(topic string, handler interface{}) error

type NoopBus

type NoopBus struct{}

func (*NoopBus) Publish

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

func (*NoopBus) Subscribe

func (b *NoopBus) Subscribe(topic string, handler interface{}) error

func (*NoopBus) Unsubscribe

func (b *NoopBus) Unsubscribe(topic string, handler interface{}) error

type Publisher

type Publisher interface {
	Publish(topic string, args ...interface{})
}

type Subscriber

type Subscriber interface {
	Subscribe(topic string, fn interface{}) error
	Unsubscribe(topic string, handler interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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