controller

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureNotReadyOnError

func EnsureNotReadyOnError(ctx context.Context, client client.Client, obj common_types.Object, err error) bool

EnsureNotReadyOnError sets the Ready condition to false on the object if the error is not nil and the Ready condition is not already set to false.

func Fetch

func Fetch(ctx context.Context, client client.Client, namespacedName types.NamespacedName, object client.Object) error

func FirstSetup

func FirstSetup(ctx context.Context, client client.Client, object common_types.Object) (bool, error)

func GetEnvironment

func GetEnvironment(object metav1.Object) (string, bool)

func HandleError

func HandleError(ctx context.Context, err error, obj common_types.Object, recorder record.EventRecorder) reconcile.Result

func IsBeingDeleted

func IsBeingDeleted(object metav1.Object) bool

func NewRateLimiter

func NewRateLimiter[T reconcile.Request]() workqueue.TypedRateLimiter[T]

Types

type Controller

type Controller[T common_types.Object] interface {
	Reconcile(context.Context, reconcile.Request, T) (reconcile.Result, error)
}

func NewController

func NewController[T common_types.Object](handler handler.Handler[T], client client.Client, recorder record.EventRecorder) Controller[T]

type ControllerImpl

type ControllerImpl[T common_types.Object] struct {
	Client client.Client
	Scheme *runtime.Scheme

	Handler  handler.Handler[T]
	Recorder record.EventRecorder
}

func (*ControllerImpl[T]) Event

func (c *ControllerImpl[T]) Event(ctx context.Context, object common_types.Object, eventType, reason, message string)

func (*ControllerImpl[T]) Reconcile

func (c *ControllerImpl[T]) Reconcile(ctx context.Context, req reconcile.Request, object T) (reconcile.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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