async

package
v0.0.0-...-570c91f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errable

func Errable(fn func() error) <-chan error

func FlatMap

func FlatMap[T any, D any](src []T, concurrencyLimit int, f func(T) ([]D, error)) ([]D, error)

func Map

func Map[T any, D any](src []T, concurrencyLimit int, f func(T) (D, error)) ([]D, error)

func WaitAll

func WaitAll(chans ...<-chan error) error

WaitAll waits for all the given errables to finish, and returns the last error occurred in all errables, if any.

Types

type Errors

type Errors struct {
	E []error
}

func (Errors) Error

func (e Errors) Error() string

func (Errors) Wrapped

func (e Errors) Wrapped() error

Jump to

Keyboard shortcuts

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