errs2

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(errch chan error, duration time.Duration) error

Collect returns first error from channel and all errors that happen within duration

func IgnoreCanceled

func IgnoreCanceled(err error) error

IgnoreCanceled returns nil, when the operation was about canceling.

func IsCanceled added in v0.15.0

func IsCanceled(err error) bool

IsCanceled returns true, when the error is a cancellation.

func IsRPC added in v0.14.8

func IsRPC(err error, code rpcstatus.StatusCode) bool

IsRPC checks if err contains an RPC error with the given status code.

Types

type Group added in v0.10.2

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

Group is a collection of goroutines working on subtasks that are part of the same overall task.

func (*Group) Go added in v0.10.2

func (group *Group) Go(f func() error)

Go calls the given function in a new goroutine.

func (*Group) Wait added in v0.10.2

func (group *Group) Wait() []error

Wait blocks until all function calls from the Go method have returned, then returns all errors (if any) from them.

Jump to

Keyboard shortcuts

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