reconciler

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

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