errgroup

package
v0.0.0-...-d434383 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupMapAndWait

func GroupMapAndWait[TIn, TOut any](group *Group, inputs []TIn, fn func(ctx context.Context, input TIn) (TOut, error)) (res []TOut, err error)

func Map

func Map[TIn, TOut any](ctx context.Context, inputs []TIn, fn func(ctx context.Context, input TIn) (TOut, error)) (res []TOut, err error)

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

func WithContext

func WithContext(ctx context.Context) *Group

func (*Group) Go

func (g *Group) Go(f func(ctx context.Context) error)

func (*Group) SetLimit

func (g *Group) SetLimit(n int)

func (*Group) TryGo

func (g *Group) TryGo(f func(ctx context.Context) error) bool

func (*Group) Wait

func (g *Group) Wait() error

type SettledGroup

type SettledGroup struct {
	// contains filtered or unexported fields
}

func (*SettledGroup) Go

func (g *SettledGroup) Go(fn func() (err error))

func (*SettledGroup) Wait

func (g *SettledGroup) Wait() []error

Jump to

Keyboard shortcuts

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