Documentation ¶
Overview ¶
Package error exists only to break an import loop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnhandledMessage = errors.New("unhandled message")
ErrUnhandledMessage indicates to the dispatcher that the handler didn't handle the message. It should be returned plainly, not wrapped as permanent or relayable.
Functions ¶
func EnsurePermanent ¶ added in v0.2011.2
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 ¶
IsPermanent returns true iff the error is a permanent p2p message handler error.
func IsRelayable ¶ added in v0.2011.2
IsRelayable returns true if the error is relayable.
func Relayable ¶ added in v0.2011.2
Relayable wraps an error returned by various handler functions to mark the error as relayable.
func ShouldRelay ¶ added in v0.2011.2
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.