common

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	StorePrefixMessages             byte = 1
	StorePrefixMessageMetadata      byte = 2
	StorePrefixMilestones           byte = 3
	StorePrefixChildren             byte = 4
	StorePrefixSnapshot             byte = 5
	StorePrefixUnreferencedMessages byte = 6
	StorePrefixIndexation           byte = 7
	StorePrefixHealth               byte = 255
)

Variables

View Source
var (
	// ErrOperationAborted is returned when the operation was aborted e.g. by a shutdown signal.
	ErrOperationAborted = errors.New("operation was aborted")
	// ErrMessageNotFound is returned when a message was not found.
	ErrMessageNotFound = errors.New("message not found")
	// ErrNodeNotSynced is returned when the node is not synchronized.
	ErrNodeNotSynced = errors.New("node is not synchronized")
	// ErrNodeLoadTooHigh is returned when the load on the node is too high.
	ErrNodeLoadTooHigh = errors.New("node load is too high")
)

Functions

func CriticalError

func CriticalError(err error) error

CriticalError wraps the given error as a critical error.

func IsCriticalError

func IsCriticalError(err error) error

IsCriticalError unwraps the inner error held by the critical error if the given error is a critical error. If the given error is not a critical error, nil is returned.

func IsSoftError

func IsSoftError(err error) error

IsSoftError unwraps the inner error held by the soft error if the given error is a soft error. If the given error is not a soft error, nil is returned.

func SoftError

func SoftError(err error) error

SoftError wraps the given error as a soft error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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