reconcile

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 15 Imported by: 97

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoop

func NewLoop(
	name, cluster string,
	mgr manager.Manager,
	resource ezkube.Object,
	options Options,
) *runner

Types

type DeletionReconciler

type DeletionReconciler interface {
	// we received a reconcile request for an object that was removed from the cache
	// requeue the object if returning an error
	ReconcileDeletion(request Request) error
}

type FinalizingReconciler

type FinalizingReconciler interface {
	Reconciler

	// name of the finalizer used by this handler.
	// finalizer names should be unique for a single task
	FinalizerName() string

	// finalize the object before it is deleted.
	// Watchers created with a finalizing handler will a
	Finalize(object ezkube.Object) error
}

type Loop

type Loop interface {
	RunReconciler(ctx context.Context, reconciler Reconciler, predicates ...predicate.Predicate) error
}

a Reconcile Loop runs resource reconcilers until the context gets cancelled

type Options

type Options struct {
	// If true will wait for cache sync before returning from RunReconcile
	WaitForCacheSync bool

	// If provided, attempt to verify the resource before beginning the reconcile loop
	Verifier verifier.ServerResourceVerifier
}

type Reconciler

type Reconciler interface {
	// reconcile an object
	// requeue the object if returning an error, or a non-zero "requeue-after" duration
	Reconcile(object ezkube.Object) (Result, error)
}

type Request

type Request = reconcile.Request

type Result

type Result = reconcile.Result

Jump to

Keyboard shortcuts

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