Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoBatch ¶
func DoBatch[A any](ctx context.Context, maxBatchSize, maxConcurrency int, items []A, f func(context.Context, []A) error) error
DoBatch processes a slice of items with concurrency no higher than maxConcurrency by splitting it into batches no larger than maxBatchSize. If an error is returned for any batch, the process is short-circuited and the error is immediately returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.