Documentation
¶
Index ¶
- func Parallel[T any](items []T, fn func(T) error) []error
- func ParallelMap[T any, R any](items []T, fn func(T) (R, error)) ([]R, []error)
- func Pool[T any](items []T, concurrency int, fn func(T) error) []error
- func Retry(attempts int, delay time.Duration, fn func() error) error
- func Sequential[T any](items []T, fn func(T) error) error
- func WithTimeout[T any](d time.Duration, fn func() (T, error)) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParallelMap ¶
ParallelMap maps items concurrently while preserving order, returning elements and collected errors.
func Pool ¶
Pool runs jobs concurrently but limits the number of active goroutines to `concurrency`.
func Retry ¶
Retry retries a function a given number of times with a specified delay between attempts.
func Sequential ¶
Sequential runs jobs sequentially and stops on the first error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.