errgroup

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errgroup

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

Errgroup is similar to golang.org/x/sync/errgroup.Errgroup, but this Errgroup does wait for all goroutines to complete and returns joined error.

func New

func New() Errgroup

func (*Errgroup) Go

func (eg *Errgroup) Go(f func() error)

Go calls given function in a new goroutine. Returned error will be a part of error in Wait

func (*Errgroup) Wait

func (eg *Errgroup) Wait() error

Wait waits for completion of all launched goroutines and returns composite error formed with errors.Join

Jump to

Keyboard shortcuts

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