Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Batch ¶
func Batch[T any](ctx context.Context, seq iter.Seq[T], work func(ctx context.Context, ii int, v T) error) error
Batch processes the sequence concurrently. Any error cancels the entire batch. No results are generated. This is helpful for a fanout of side-effects.
func MapErr ¶
func MapErr[In any, Out any](ctx context.Context, seq []In, work func(ctx context.Context, ii int, v In) (Out, error)) ([]Out, error)
MapErr processes the sequence concurrently, transforming [In] to [Out]. Any error cancels the entire batch. This is helpful for a fanout of fallible transformations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.