Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Worker ¶
type Worker[T any] struct { Input <-chan T Output map[string]chan<- T Cmds chan Command[T] Policy Policy }
Worker broadcasts messages to multiple output channels.
func (*Worker[T]) Init ¶
Init initializes an existing worker with given input and policy. It also allocates the internal map and command channel.
func (*Worker[T]) RemoveInput ¶
RemoveInput unregisters the input channel.
func (*Worker[T]) RemoveOutput ¶
RemoveOutput unregisters an output channel.
Click to show internal directories.
Click to hide internal directories.