Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forker ¶
type Forker[OUT any] struct { // contains filtered or unexported fields }
Forker manages the access to a Node's output (send) channel. When a node sends to only one node, this will work as a single channel. When a node sends to N nodes, it will spawn N channels that are cloned from the original channel in a goroutine.
func Fork ¶
Fork provides connection to a group of output Nodes, accessible through their respective Joiner instances.
type Joiner ¶
type Joiner[IN any] struct { // contains filtered or unexported fields }
Joiner provides shared access to the input channel of a node of the type IN
func (*Joiner[IN]) AcquireSender ¶
func (j *Joiner[IN]) AcquireSender() chan IN
AcquireSender gets acces to the channel as a sender. The acquirer must finally invoke ReleaseSender to make sure that the channel is closed when all the senders released it.
func (*Joiner[IN]) Receiver ¶
func (j *Joiner[IN]) Receiver() chan IN
Receiver gets access to the channel as a receiver
func (*Joiner[IN]) ReleaseSender ¶
func (j *Joiner[IN]) ReleaseSender()
ReleaseSender will close the channel when all the invokers of the AcquireSender have invoked this function