controller

package
v0.0.0-...-5af6993 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WaitDelete = fmt.Errorf("wait delete resource")

Functions

func DefaultFunc

func DefaultFunc(ctx context.Context, obj client.Object) error

func GetConcurrent

func GetConcurrent(opts RateLimiterOptions) int

Types

type Controller

type Controller struct {
	client.Client
	Eventer       record.EventRecorder
	Operator      Operator
	Gvk           schema.GroupVersionKind
	Logger        logr.Logger
	FinalizerName string
}

func (*Controller) GroupVersionKind

func (r *Controller) GroupVersionKind() schema.GroupVersionKind

func (*Controller) Run

func (r *Controller) Run(ctx context.Context, req ctrl.Request, obj client.Object) (ctrl.Result, error)

type Finalizer

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

func NewFinalizer

func NewFinalizer(client client.Client, finalizerName string) *Finalizer

func (*Finalizer) AddFinalizer

func (f *Finalizer) AddFinalizer(ctx context.Context, obj client.Object) (bool, error)

func (*Finalizer) RemoveFinalizer

func (f *Finalizer) RemoveFinalizer(ctx context.Context, obj client.Object, fun func(ctx context.Context, obj client.Object) error) (bool, error)

type Operator

type Operator interface {
	Update(ctx context.Context, req ctrl.Request, gvk schema.GroupVersionKind, obj client.Object) (ctrl.Result, error)
	Delete(ctx context.Context, req ctrl.Request, gvk schema.GroupVersionKind, obj client.Object) error
}

type RateLimiterOptions

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

RateLimiterOptions used on reconcilers.

func (*RateLimiterOptions) BindFlags

func (o *RateLimiterOptions) BindFlags(fs *flag.FlagSet)

Jump to

Keyboard shortcuts

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