Documentation
¶
Overview ¶
Package errgroup provides synchronization, error propagation and context cancellation for groups of goroutines working on subtasks of a common task, mirroring the WithContext, Go and Wait subset of the golang.org/x/sync/errgroup API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group is a collection of goroutines working on subtasks of a common task. The zero value is valid and does not cancel a context on error. A Group must not be reused for different tasks.
func WithContext ¶
WithContext returns a new Group and an associated context derived from ctx. The derived context is canceled the first time a function passed to Go returns a non-nil error or the first time Wait returns, whichever occurs first; the error is available via context.Cause.