bus

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 3 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 (b *Bus) Publish(ctx context.Context, topic string, message any) error

func (*Bus) Subscribe

func (b *Bus) Subscribe(topic string, buffer int) Subscription

type Envelope

type Envelope struct {
	Topic     string
	Message   any
	Timestamp time.Time
}

type Subscription

type Subscription interface {
	C() <-chan Envelope
	Close() error
}

Jump to

Keyboard shortcuts

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