multicluster_v2

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeletionReconciler

type DeletionReconciler[T client.Object] interface {
	// we received a reconcile request for an object that was removed from the cache
	// requeue the object if returning an error,
	ReconcileDeletion(ctx context.Context, cluster string, request reconcile.Request) error
}

type Loop

type Loop[T client.Object] interface {
	// AddReconciler adds a reconciler to a slice of reconcilers that will be run against
	AddReconciler(ctx context.Context, reconciler Reconciler[T], predicates ...predicate.Predicate)
}

Loop runs resource reconcilers until the context gets cancelled

type Reconciler

type Reconciler[T client.Object] interface {
	// reconcile an object
	// requeue the object if returning an error, or a non-zero "requeue-after" duration
	Reconcile(ctx context.Context, cluster string, object T) (reconcile.Result, error)
}

type ReconcilerFuncs

type ReconcilerFuncs[T client.Object] struct {
	ReconcileFunc         func(ctx context.Context, cluster string, object T) (reconcile.Result, error)
	ReconcileDeletionFunc func(ctx context.Context, cluster string, request reconcile.Request) error
}

func (*ReconcilerFuncs[T]) Reconcile

func (r *ReconcilerFuncs[T]) Reconcile(ctx context.Context, cluster string, object T) (reconcile.Result, error)

func (*ReconcilerFuncs[T]) ReconcileDeletion

func (r *ReconcilerFuncs[T]) ReconcileDeletion(ctx context.Context, cluster string, request reconcile.Request) error

Jump to

Keyboard shortcuts

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