Documentation ¶
Index ¶
- func Batch[T any](ctx context.Context, ch <-chan T, batchSize int, fn func([]T))
- func BatchFilter[T, V any](ctx context.Context, ch <-chan T, batchSize int, filter func(T) V, ...)
- func FlatBatch[T any](ctx context.Context, ch <-chan []T, batchSize int, fn func([]T))
- func FlatBatchFilter[T, V any](ctx context.Context, ch <-chan []T, batchSize int, filter func(T) V, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchFilter ¶ added in v0.2.0
func BatchFilter[T, V any](ctx context.Context, ch <-chan T, batchSize int, filter func(T) V, fn func([]V))
BatchFilter reads from a channel, filters values, and calls fn with a slice of batchSize.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.