Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
Broadcaster is fan-out pattern for the control flow. It broadcasts a request to all subscribers and waits for their acknowledgment. It is useful for scenarios where multiple components need to be notified of an event or a change in state, and they need to acknowledge that they have received the event before proceeding. The broadcaster owns a list of channels that are used to communicate with the subscribers.
func New ¶
func New() *Broadcaster
func (*Broadcaster) Close ¶
func (b *Broadcaster) Close()
func (*Broadcaster) Register ¶
func (b *Broadcaster) Register() chan chan struct{}
func (*Broadcaster) Unregister ¶
func (b *Broadcaster) Unregister(ch chan chan struct{})
Click to show internal directories.
Click to hide internal directories.