Documentation ¶
Index ¶
Constants ¶
const EventTypeNone = "None"
EventTypeNone indicates no error event. It can be used to disable error events.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.25.0
type Config struct { // Event is the event type of an error. It is used to configure what type of // event an error should result in. // Valid values: // - EventTypeNone // - corev1.EventTypeNormal // - corev1.EventTypeWarning Event string // Log is used to configure if an error should be logged. The log level is // derived from the Event type. // None event - info log // Normal event - info log // Warning event - error log Log bool // Notification is used to emit an error as a notification alert to a // a notification service. Notification bool // Ignore is used to suppress the error for no-op reconciliations. It may // be applicable to non-contextual errors only. Ignore bool }
Config is the error configuration. It is embedded in the errors and can be used to configure how the error should be handled. These configurations mostly define actions to be taken on the errors. Not all the configurations may apply to every error.
type Generic ¶ added in v0.25.0
type Generic struct { // Reason is the reason for the generic error. Reason string // Error is the error that caused the generic error. Err error // Config is the error handler configuration. Config }
Generic error is a generic reconcile error. It can be used in scenarios that don't have any special contextual meaning.
func NewGeneric ¶ added in v0.25.0
NewGeneric constructs a new Generic error with default configuration.
type Stalling ¶
type Stalling struct { // Reason is the stalled condition reason string. Reason string // Err is the error that caused stalling. This can be used as the message in // stalled condition. Err error // Config is the error handler configuration. Config }
Stalling is the reconciliation stalled state error. It contains an error and a reason for the stalled condition. It is a contextual error, used to express the scenario which contributed to the reconciliation result.
func NewStalling ¶ added in v0.25.0
NewStalling constructs a new Stalling error with default configuration.
type Waiting ¶
type Waiting struct { // RequeueAfter is the wait duration after which to requeue. RequeueAfter time.Duration // Reason is the reason for the wait. Reason string // Err is the error that caused the wait. Err error // Config is the error handler configuration. Config }
Waiting is the reconciliation wait state error. It contains an error, wait duration and a reason for the wait. It is a contextual error, used to express the scenario which contributed to the reconciliation result. It is for scenarios where a reconciliation needs to wait for something else to take place first.
func NewWaiting ¶ added in v0.25.0
NewWaiting constructs a new Waiting error with default configuration.