v0.2300.9 Latest Latest

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0



Package error exists only to break an import loop.



This section is empty.


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

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


func EnsurePermanent

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

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

func Relayable(err error) error

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

func ShouldRelay

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.


This section is empty.

Jump to

Keyboard shortcuts

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