controller

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 19 Imported by: 8

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 added in v1.0.1

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