Documentation
¶
Index ¶
- func Closed[T any](channel <-chan T) bool
- func Limit[T any](maximum int, input <-chan T, done chan struct{}) <-chan T
- func Pipe[T any](input <-chan T, output chan<- T)
- func PipeWithCancel[T any](input <-chan T, output chan<- T, done <-chan struct{})
- func Reverse[T any](input <-chan T, done <-chan struct{}) <-chan T
- func Slice[T any](channel <-chan T) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Closed ¶
Closed returns TRUE if this channel is closed, and FALSE otherwise. It does not read from the channel, and is just a simple wrapper around a select statement.
func Limit ¶
Limit returns a channel that will receive at most the specified number of items from the input channel. When the maximum is reached, Limit will close the "done" channel, to communicate to other goroutines that they can stop sending items.
func Pipe ¶
func Pipe[T any](input <-chan T, output chan<- T)
Pipe reads the contents of one channel directly into another channel.
func PipeWithCancel ¶
func PipeWithCancel[T any](input <-chan T, output chan<- T, done <-chan struct{})
PipeWithCancel reads the contents of one channel directly into another channel. If the "done" channel is closed, the pipe will stop.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.