Documentation
¶
Overview ¶
Package gostream provides utility functions for channel processing
Index ¶
- func GenerateRandIntsStream(ctx context.Context) <-chan interface{}
- func GenerateRepeatStream(ctx context.Context, list ...interface{}) <-chan interface{}
- func GenerateSerialIntsStream(ctx context.Context) <-chan interface{}
- func Map(ctx context.Context, f func(args ...interface{}) interface{}, ...) <-chan interface{}
- func Merge(ctx context.Context, inStreams ...<-chan interface{}) <-chan interface{}
- func Take(ctx context.Context, inStream <-chan interface{}, num int) <-chan interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandIntsStream ¶
GenerateRandIntsStream generates a random integer sequence infinitely.
func GenerateRepeatStream ¶
GenerateRepeatStream generates all elemtnes of the list infinitely
func GenerateSerialIntsStream ¶
GenerateSerialIntsStream produces an infinite serial integer sequence in ascending order.
func Map ¶
func Map(ctx context.Context, f func(args ...interface{}) interface{}, inStreams ...<-chan interface{}) <-chan interface{}
Map first applies the function f to the first element of all input streams. Also, Map does the same for the second and subsequent elements.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.