Documentation
¶
Index ¶
- func FanIn[T any](ctx context.Context, channels ...<-chan T) <-chan T
- func FanOut[T any, H any](ctx context.Context, inputStream <-chan T, fn func(context.Context, T) H, ...) []<-chan H
- func GenerateStream[T any](ctx context.Context, fn func(context.Context) T) <-chan T
- func StreamMap[T comparable, H comparable](ctx context.Context, data map[T]H) <-chan H
- func StreamSlice[T any](ctx context.Context, data []T) <-chan T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FanOut ¶
func FanOut[T any, H any](ctx context.Context, inputStream <-chan T, fn func(context.Context, T) H, numFan int) []<-chan H
FanOut controls concurrent processing of data from the input channel
func GenerateStream ¶
GenerateStream takes a function that generates data and returns a channel of type T
func StreamMap ¶
func StreamMap[T comparable, H comparable](ctx context.Context, data map[T]H) <-chan H
StreamMap takes a map of type map[T]H and returns a channel of type H
func StreamSlice ¶
StreamSlice takes a slice of type []T and returns a channel of type T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.