errors

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrProbeAPIServer is the error code for errors in the API server probe.
	ErrProbeAPIServer = "ERR_PROBE_API_SERVER"
	// ErrSetupProbeClient is the error code for errors in setting up the probe client.
	ErrSetupProbeClient = "ERR_SETUP_PROBE_CLIENT"
	// ErrProbeNodeLease is the error code for errors in the node lease probe.
	ErrProbeNodeLease = "ERR_PROBE_NODE_LEASE"
	// ErrScaleUp is the error code for errors in scaling up the dependent resources
	ErrScaleUp = "ERR_SCALE_UP"
	// ErrScaleDown is the error code for errors in scaling down the dependent resources
	ErrScaleDown = "ERR_SCALE_DOWN"
)

Variables

This section is empty.

Functions

func WrapError

func WrapError(err error, code ErrorCode, message string) error

WrapError wraps an error with an error code and a message.

Types

type ErrorCode

type ErrorCode string

ErrorCode is the type for error codes.

type ProbeError

type ProbeError struct {
	// Code is the error code that is returned by the probe.
	Code ErrorCode
	// Cause is the error that happened during the probe.
	Cause error
	// Message is used for mentioning additional details describing the error.
	Message string
}

ProbeError is the error type for probe errors. It contains the error code, the cause of the error, and the error message. It is used by prober to record its last error and is currently only used for unit tests.

func (*ProbeError) Error

func (e *ProbeError) Error() string

Error is the error interface implementation for ProbeError.

Jump to

Keyboard shortcuts

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