para

package
v0.0.0-...-d464d88 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT, Unlicense Imports: 5 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, 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 Fanout

func Fanout[V any](seq iter.Seq[V], fn func(value V))

Fanout processes a sequence concurrently.

func Gather

func Gather(fns ...func() error) error

Gather processes a batch of heterogenous operations.

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.

Jump to

Keyboard shortcuts

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