basecontroller

package
v0.0.0-...-a7b7215 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: UPL-1.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReconciler

type BaseReconciler struct {
	// Client is the controller-runtime client
	client.Client

	// Scheme is the CR scheme
	Scheme *runtime.Scheme

	// Controller is a controller-runtime controller
	Controller controller.Controller
	// contains filtered or unexported fields
}

BaseReconciler contains data needed to reconcile a DNS object.

func CreateControllerAndAddItToManager

func CreateControllerAndAddItToManager(mgr controllerruntime.Manager, controllerConfig ControllerConfig) (*BaseReconciler, error)

CreateControllerAndAddItToManager creates the base controller and adds it to the manager.

func (*BaseReconciler) GetLastWatchEvent

func (r *BaseReconciler) GetLastWatchEvent(reconcilingResourceNSN types.NamespacedName) *controllerspi.WatchEvent

GetLastWatchEvent gets the last WatchEvent for the resource

func (*BaseReconciler) Reconcile

func (r *BaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile the resource The controller-runtime will call this method repeatedly if the ctrl.Result.Requeue is true, or an error is returned This code will always return a nil error, and will set the ctrl.Result.Requeue to true (with a delay) if a requeue is needed.

type ControllerConfig

ControllerConfig specifies the config of the controller using this base controller

type WatchContext

type WatchContext struct {
	// contains filtered or unexported fields
}

WatchContext provides context to a watcher There is a WatchContext for each resource being watched by each instance of a CR.

func (*WatchContext) Watch

func (w *WatchContext) Watch() error

Watch for a specific resource type

Jump to

Keyboard shortcuts

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