error

package
v0.2201.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package error exists only to break an import loop.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnhandledMessage = Permanent(errors.New("unhandled message"))

ErrUnhandledMessage indicates to the dispatcher that the handler didn't handle the message.

Functions

func EnsurePermanent added in v0.2011.2

func EnsurePermanent(err error) error

EnsurePermanent ensures an error will be correctly treated as (non-)permanent by `cenkalti/backoff/v4`.

Note: `IsPermanent` special cases `conext.Canceled` and doesn't ever handle it as a permanent error.

func IsPermanent

func IsPermanent(err error) bool

IsPermanent returns true iff the error is a permanent p2p message handler error.

func IsRelayable added in v0.2011.2

func IsRelayable(err error) bool

IsRelayable returns true if the error is relayable.

func Permanent

func Permanent(err error) error

Permanent wraps an error returned by various handler functions to suppress retry.

func Relayable added in v0.2011.2

func Relayable(err error) error

Relayable wraps an error returned by various handler functions to mark the error as relayable.

func ShouldRelay added in v0.2011.2

func ShouldRelay(err error) bool

ShouldRelay returns if true the message should be relayed despite the error.

In adition to all non-permanent errors, errors that are explicitly marked as relayable should be relayed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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