Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier[T any] struct { // contains filtered or unexported fields }
Notifier is the sending endpoint of an event notification mechanism. It broadcasts a stream of events to a number of receivers.
func (*Notifier[T]) Flush ¶
Flush flushes all pending notifications. Note that for Flush to work as expected, a quiescent period is required, i.e. you should not send more events until Flush returns.
func (*Notifier[T]) NewReceiver ¶
NewReceiver creates a new Receiver associated with the given Notifier.
type Receiver ¶
type Receiver[T any] struct { // C is a channel to read the events from. // Note that it is part of the public interface of this package. C chan T // contains filtered or unexported fields }
Receiver is the receiving endpoint of a single-producer-multiple-consumer notification mechanism.
Click to show internal directories.
Click to hide internal directories.