reconciler

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteResource

func DeleteResource[
	orcObjectPT interface {
		*orcObjectT
		client.Object
		orcv1alpha1.ObjectWithConditions
	}, orcObjectT any,
	resourceSpecT any, filterT any,
	osResourceT any,
](
	ctx context.Context, log logr.Logger, controller ResourceController,
	objAdapter interfaces.APIObjectAdapter[orcObjectPT, resourceSpecT, filterT],
	actuator interfaces.DeleteResourceActuator[orcObjectPT, orcObjectT, osResourceT],
) (bool, *osResourceT, progress.ReconcileStatus)

func GetOrCreateOSResource

func GetOrCreateOSResource[
	orcObjectPT interface {
		*orcObjectT
		client.Object
		orcv1alpha1.ObjectWithConditions
	}, orcObjectT any,
	resourceSpecT any, filterT any,
	osResourceT any,
](
	ctx context.Context, log logr.Logger, controller ResourceController,
	objAdapter interfaces.APIObjectAdapter[orcObjectPT, resourceSpecT, filterT],
	actuator interfaces.CreateResourceActuator[orcObjectPT, orcObjectT, filterT, osResourceT],
) (*osResourceT, progress.ReconcileStatus)

Types

type Controller

type Controller[
	orcObjectPT interface {
		*orcObjectT
		client.Object
		orcv1alpha1.ObjectWithConditions
	},
	orcObjectT any,
	resourceSpecT any,
	filterT any,
	objectApplyPT interfaces.ORCApplyConfig[objectApplyPT, statusApplyPT],
	statusApplyPT interface {
		*statusApplyT
		interfaces.ORCStatusApplyConfig[statusApplyPT]
	},
	statusApplyT any,
	osResourceT any,
] struct {
	// contains filtered or unexported fields
}

func NewController

func NewController[
	orcObjectPT interface {
		*orcObjectT
		client.Object
		orcv1alpha1.ObjectWithConditions
	}, orcObjectT any,
	resourceSpecT any, filterT any,
	objectApplyPT interfaces.ORCApplyConfig[objectApplyPT, statusApplyPT],
	statusApplyPT interface {
		*statusApplyT
		interfaces.ORCStatusApplyConfig[statusApplyPT]
	}, statusApplyT any,
	osResourceT any,
](
	name string, k8sClient client.Client, scopeFactory scope.Factory,
	helperFactory interfaces.ResourceHelperFactory[orcObjectPT, orcObjectT, resourceSpecT, filterT, osResourceT],
	statusWriter interfaces.ResourceStatusWriter[orcObjectPT, *osResourceT, objectApplyPT, statusApplyPT],
) Controller[orcObjectPT, orcObjectT, resourceSpecT, filterT, objectApplyPT, statusApplyPT, statusApplyT, osResourceT]

func (*Controller[_, _, _, _, _, _, _, _]) GetK8sClient

func (c *Controller[_, _, _, _, _, _, _, _]) GetK8sClient() client.Client

func (*Controller[_, _, _, _, _, _, _, _]) GetName

func (c *Controller[_, _, _, _, _, _, _, _]) GetName() string

func (*Controller[_, _, _, _, _, _, _, _]) GetScopeFactory

func (c *Controller[_, _, _, _, _, _, _, _]) GetScopeFactory() scope.Factory

func (*Controller[orcObjectPT, orcObjectT, resourceSpecT, filterT, objectApplyPT, statusApplyPT, statusApplyT, osResourceT]) Reconcile

func (c *Controller[
	orcObjectPT, orcObjectT,
	resourceSpecT, filterT,
	objectApplyPT,
	statusApplyPT, statusApplyT,
	osResourceT,
]) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

type ResourceController

type ResourceController interface {
	GetName() string

	GetK8sClient() client.Client
	GetScopeFactory() scope.Factory
}

Jump to

Keyboard shortcuts

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