Documentation
¶
Overview ¶
Package pubsub provides cluster-wide publishing and subscribing of events
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSubscriptionTerminated = errors.New("broker terminated the subscription")
ErrSubscriptionTerminated is for use by subscribers to indicate that their subscription has been terminated by the broker.
Functions ¶
Types ¶
type Broker ¶
type Broker[T any] struct { // contains filtered or unexported fields }
Broker allows clients to subscribe to OTF events.
func (*Broker[T]) Disable ¶ added in v0.5.20
func (b *Broker[T]) Disable()
Disable the broker. All subscribers are forcily unsubscribed.
func (*Broker[T]) Forward ¶ added in v0.5.20
Forward retrieves the type T uniquely identified by id and forwards it onto subscribers as an event together with the action.
Click to show internal directories.
Click to hide internal directories.