errors

package
v4.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConnCanceled

func IsConnCanceled(err error) bool

IsConnCanceled returns true, if error is from a closed gRPC connection. copied from https://github.com/etcd-io/etcd/blob/7f47de84146bdc9225d2080ec8678ca8189a2d2b/clientv3/client.go#L646

func LogError

func LogError(logger log.Logger, message string, f func() error)

LogError logs any error returned by f; useful when deferring Close etc.

Types

type GroupedErrors

type GroupedErrors struct {
	MultiError
}

GroupedErrors implements the error interface, and it contains the errors used to construct it grouped by the error message.

func (GroupedErrors) Error

func (es GroupedErrors) Error() string

Error Returns a concatenated string of the errors grouped by the error message along with the number of occurrences of each error message.

type MultiError

type MultiError []error

The MultiError type implements the error interface, and contains the Errors used to construct it.

func (*MultiError) Add

func (es *MultiError) Add(err error)

Add adds the error to the error list if it is not nil.

func (MultiError) Err

func (es MultiError) Err() error

Err returns the error list as an error or nil if it is empty.

func (MultiError) Error

func (es MultiError) Error() string

Returns a concatenated string of the contained errors

func (MultiError) Is

func (es MultiError) Is(target error) bool

Is tells if all errors are the same as the target error.

func (MultiError) IsDeadlineExceeded

func (es MultiError) IsDeadlineExceeded() bool

IsDeadlineExceeded tells if all errors are either context.DeadlineExceeded or grpc codes.DeadlineExceeded.

Jump to

Keyboard shortcuts

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