pubsub

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxSubscribers = 500_000
)

Variables

View Source
var (
	ErrTooManySubscribers = errors.New("too many subscribers")
	ErrTopicNotFound      = errors.New("topic not found")
)

Functions

This section is empty.

Types

type EventBus

type EventBus interface {
	AddTopic(name string, src <-chan coretypes.ResultEvent) error
	RemoveTopic(name string)
	Subscribe(name string) (<-chan coretypes.ResultEvent, UnsubscribeFunc, error)
	Topics() []string
}

func NewEventBus

func NewEventBus(opts ...Option) EventBus

type Option added in v0.3.0

type Option func(bus *memEventBus)

func WithMaxSubscribers added in v0.3.0

func WithMaxSubscribers(n int) Option

type UnsubscribeFunc

type UnsubscribeFunc func()

Jump to

Keyboard shortcuts

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