Documentation ¶
Index ¶
- func Accumulate[T any](c <-chan T) chan []T
- func Broadcast[T any](c <-chan T, aggresive bool, outs ...chan<- T)
- func Fork[T any](handler func() (T, error)) (out chan T, e chan error)
- func GiantChan[T any](in <-chan T, out chan<- T, limit uint64) (count *uint64)
- func Merge[T any](chans ...<-chan T) chan T
- func Sort[T any](c <-chan SortItem[T], limit int) (out chan T, overflow chan SortItem[T])
- func Split[T any](c <-chan T, outs ...chan<- T)
- type SortItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accumulate ¶
func Accumulate[T any](c <-chan T) chan []T
Accumulates the content of a channel into an array
func Broadcast ¶
Broadcasts a message to a list of channe. If aggresive is set to true all output channels are guarenteed to receive every item sent, otherwise it will do its best
func Fork ¶
Runs a function in a goroutine and returns the result type and error as channels, saves the boiler plate
Types ¶
Click to show internal directories.
Click to hide internal directories.