operator

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstructorOption

type ConstructorOption func(options *constructorOptions) error

func WithCustomPredicate

func WithCustomPredicate(prct predicate.Predicate) ConstructorOption

func WithManagerOptions

func WithManagerOptions(mgrOpts *manager.Options) ConstructorOption

func WithOwns

func WithOwns(object client.Object, filter predicate.Predicate) ConstructorOption

type HandlerOption

type HandlerOption func(options *handlerOptions) error

func WithAnnotations

func WithAnnotations(annotations map[string]string) HandlerOption

WithAnnotations sets the annotations used to filter events for the handler. Calling it multiple times merges the values.

func WithLabels

func WithLabels(labels map[string]string) HandlerOption

WithLabels sets the labels used to filter events for the handler. Calling it multiple times merges the values.

type Operator

type Operator interface {
	OnCreateOrUpdate(handler reconcile.Handler, opts ...HandlerOption)
	OnDelete(handler reconcile.Handler, opts ...HandlerOption)
	Predicate() predicate.Predicate
	Build() error
	Start() error
}

Operator knows how to call event handling operations for a specific event and Kubernetes resource

func New

func New(object client.Object, opts ...ConstructorOption) (Operator, error)

New is a constructor function that creates a new instance of Operator. It takes an object of type client.Object and a variadic list of constructorOptions. It returns an Operator and an error, if any.

func NewUntyped

func NewUntyped(group, version, kind string, opts ...ConstructorOption) (Operator, error)

NewUntyped is a constructor function that creates a new instance of Operator. It takes a string parameter for each GVK (group, version and kind) attributes of Kubernetes Object and a variadic list of constructorOptions. It returns an Operator and an error, if any.

type OwnsInput

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

Jump to

Keyboard shortcuts

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