Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus[T any] struct { // contains filtered or unexported fields }
func (*Bus[T]) Subscribe ¶
func (b *Bus[T]) Subscribe() <-chan T
Subscribe registers a best-effort subscriber. Events are dropped when the subscriber's buffer is full so a slow observer cannot block publishers.
func (*Bus[T]) SubscribeLossless ¶
func (b *Bus[T]) SubscribeLossless() <-chan T
SubscribeLossless registers a backpressured subscriber. Publish waits for this subscriber when its buffer is full instead of dropping events.
Click to show internal directories.
Click to hide internal directories.