broadcast

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

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) Cast

func (b *Broadcaster) Cast(ctx context.Context) error

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{})

Jump to

Keyboard shortcuts

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