Documentation
¶
Index ¶
Constants ¶
const ErrCodeContinueReconcileAndRequeue grovecorev1alpha1.ErrorCode = "ERR_CONTINUE_RECONCILE_AND_REQUEUE"
ErrCodeContinueReconcileAndRequeue is a special error code that indicates that the Sync of a current component errored, but the following components should be attempted to be synced, and then the current step should be re-queued after a certain time.
const ErrCodeRequeueAfter grovecorev1alpha1.ErrorCode = "ERR_REQUEUE_AFTER"
ErrCodeRequeueAfter is a special error code that indicates that the current step should be re-queued after a certain time,
Variables ¶
var ( // ErrMissingPodTemplateHashLabel is a sentinel error indicating that a pod is missing the pod-template-hash label. ErrMissingPodTemplateHashLabel = errors.New("missing pod template hash label") )
Functions ¶
func MapToLastErrors ¶
func MapToLastErrors(errs []error) []grovecorev1alpha1.LastError
MapToLastErrors maps the given errors (that are GroveError's) to LastError slice.
Types ¶
type GroveError ¶
type GroveError struct {
// Code indicates the category of error.
Code grovecorev1alpha1.ErrorCode
// Cause is the underline error.
Cause error
// Operation is the semantic operation during which this error is created/wrapped.
Operation string
// Message is the custom message providing additional context for the error.
Message string
// ObservedAt is the time at which the error was observed.
ObservedAt time.Time
}
GroveError is a custom error type that should be used throughout grove which encapsulates the underline error (cause), uniquely identifiable error code, contextual information captured as operation during which an error occurred and any custom message.
func (*GroveError) Error ¶
func (e *GroveError) Error() string