reconciler

package
v0.0.0-...-f651028 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReconciler

func NewReconciler[T client.Object](kube client.Client, reconciler Reconciler[T]) reconcile.Reconciler

NewReconciler returns a new instance of Reconciler.

Types

type Reconciler

type Reconciler[T client.Object] interface {
	// NewObject returns a new instance of T.
	// Users should just return an empty object without any fields set.
	NewObject() T
	// Provision is called when reconciling objects.
	// This is only called when the object exists and was fetched successfully.
	Provision(ctx context.Context, obj T) (reconcile.Result, error)
	// Deprovision is called when the object has a deletion timestamp set.
	Deprovision(ctx context.Context, obj T) (reconcile.Result, error)
}

Reconciler is a generic controller.

Jump to

Keyboard shortcuts

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