controller

package
v0.34.9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Immediately = 1 * time.Nanosecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter adapts a controllerruntime.Builder into the Builder interface

func (*Adapter) Complete

func (a *Adapter) Complete(r Reconciler) error

type Builder

type Builder interface {
	// Complete builds a builder by registering the Reconciler with the manager
	Complete(Reconciler) error
}

Builder is a struct, that when complete, registers the passed reconciler with the manager stored insider of the builder. Typed reference implementations, see controllerruntime.Builder

func Adapt

func Adapt(builder *controllerruntime.Builder) Builder

type Controller

type Controller interface {
	Reconciler

	// Builder returns a Builder registered with the manager that can be wrapped
	// with other Builders and completed later to complete registration to the manager
	Builder(context.Context, manager.Manager) Builder
}

Controller defines a controller that can be registered with controller-runtime

func Typed

func Typed[T client.Object](kubeClient client.Client, typedController TypedController[T]) Controller

type FinalizingTypedController

type FinalizingTypedController[T client.Object] interface {
	TypedController[T]

	Finalize(context.Context, T) (reconcile.Result, error)
}

type Reconciler

type Reconciler interface {
	reconcile.Reconciler
	// Name is the name of the Reconciler for metrics and logging
	Name() string
}

type Singleton

type Singleton struct {
	Reconciler
	// contains filtered or unexported fields
}

func (*Singleton) NeedLeaderElection

func (s *Singleton) NeedLeaderElection() bool

func (*Singleton) Start

func (s *Singleton) Start(ctx context.Context) error

type SingletonBuilder

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

func NewSingletonManagedBy

func NewSingletonManagedBy(m manager.Manager) SingletonBuilder

func (SingletonBuilder) Complete

func (b SingletonBuilder) Complete(r Reconciler) error

type TypedController

type TypedController[T client.Object] interface {
	Reconcile(context.Context, T) (reconcile.Result, error)
	Name() string
	Builder(context.Context, manager.Manager) Builder
}

Jump to

Keyboard shortcuts

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