Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidationError ¶
func NewValidationError ¶
Types ¶
type FinalizeFunc ¶
FinalizeFunc is a function that finalizes an object. It does not remove the finalizer.
type ReconcileFunc ¶
ReconcileFunc is a function that reconciles an object.
type StandardReconciler ¶
StandardReconciler encapsulates common reconciler behavior, allowing you to implement a reconciler simply by providing a ReconcileFunc and an optional FinalizeFunc. These functions are invoked at the appropriate time and are passed the object being reconciled.
func NewStandardReconciler ¶
func NewStandardReconciler[T client.Object](cl client.Client, reconcileFunc ReconcileFunc[T]) *StandardReconciler[T]
NewStandardReconciler creates a new StandardReconciler for objects of the specified type.
func NewStandardReconcilerWithFinalizer ¶
func NewStandardReconcilerWithFinalizer[T client.Object]( cl client.Client, reconcileFunc ReconcileFunc[T], finalizeFunc FinalizeFunc[T], finalizer string, ) *StandardReconciler[T]
NewStandardReconcilerWithFinalizer is similar to NewStandardReconciler, but also accepts a finalizer and a FinalizerFunc.
func (*StandardReconciler[T]) Reconcile ¶
func (r *StandardReconciler[T]) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reconciles the object. It first fetches the object from the client, then invokes the configured ReconcileFunc. If a finalizer is configured in the reconciler, and the object is new, this function adds the finalizer to the object. When the object is being deleted, this function invokes the configured FinalizerFunc and removes the finalizer afterward.
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
func (ValidationError) Error ¶
func (v ValidationError) Error() string