chanx

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Batch

func Batch[T any](ctx context.Context, ch <-chan T, batchSize int, fn func([]T))

Batch reads from a channel and calls fn with a slice of batchSize.

func FlatBatch

func FlatBatch[T any](ctx context.Context, ch <-chan []T, batchSize int, fn func([]T))

FlatBatch reads from a channel of slices, flats values, and calls fn with a slice of batchSize.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL