Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FanIn ¶
func FanIn(done <-chan interface{}, channels ...<-chan interface{}) <-chan interface{}
FanIn multiplexes multiple input channels into a single output channel. It reads from each input channel concurrently until all channels are closed, then closes the output channel. The function takes a 'done' channel to signal cancellation, and variadic 'channels' representing the input channels to multiplex. It returns a single output channel where values from all input channels are sent.
func Take ¶
func Take(done <-chan interface{}, valueStream <-chan interface{}, noOfItemsToTake int) <-chan interface{}
Take reads values from the 'valueStream' input channel and sends them to the output channel 'takeStream'. It reads until 'noOfItemsToTake' items are taken from 'valueStream' or a cancellation signal is received on the 'done' channel. The function returns a channel 'takeStream' where the taken values are sent.
Types ¶
This section is empty.