Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateMultiError ¶
AggregateMultiError aggregates multiple errors.
func ReportErrors ¶
func ReportErrors(ctx context.Context, log logr.Logger, eventRecorder record.EventRecorder, err error) error
ReportErrors reports all errors of a known internal type as events. unknown errors are logged.
Types ¶
type Error ¶
type Error struct { // Src defines the source resource of the error. Src runtime.Object // Dst defines the destinition resource where the error occurred Dst runtime.Object // Reason defines a specific error reason Reason Reason // Msg defines a optional detailed error message Msg string // Err defines a optional wrapped error Err error }
Error a custom replication error.
type ErrorList ¶
type ErrorList []error
ErrorList defines a list of errors
func (ErrorList) AggregateError ¶
AggregateError aggregates multiple errors to one error
type ErrorReporter ¶ added in v0.3.0
type ErrorReporter struct {
// contains filtered or unexported fields
}
ErrorReporter is a struct that reports aggreagted errors. Is basically a simple wrapper for ReportErrors.
func NewErrorReporter ¶ added in v0.3.0
func NewErrorReporter(recorder record.EventRecorder) *ErrorReporter
NewErrorReporter creates a new error reporter
type Reason ¶
type Reason string
Reason defines a specific error reason
const ( // InternalError defines an internal error in the controller InternalError Reason = "InternalError" // CreateError defines an error that occurred when a replicated secret could not be created CreateError Reason = "CreateError" // UpdateError defines an error that occurred when a replicated secret could not be updated UpdateError Reason = "UpdateError" // InvalidNamespace defines an error reason that is thrown when a namespaces does not exist or cannot be validated InvalidNamespace Reason = "InvalidNamespace" )
Click to show internal directories.
Click to hide internal directories.