pubsub

package
v0.0.0-...-3cf9108 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRunning = errors.New("not running")

ErrNotRunning is the error with message "not running"

Functions

This section is empty.

Types

type Bus

type Bus[T any] interface {
	Publish(T) error
	Subscribe(filter func(T) bool) <-chan T
	Close()
	Done() <-chan struct{}
}

Bus provides a general purpose interface for message passing

func NewBus

func NewBus[T any]() Bus[T]

NewBus runs a new bus and returns bus details

Jump to

Keyboard shortcuts

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