controllertools

package
v1.14.0-rc.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNonRetriable added in v1.14.0

func IsNonRetriable(err error) bool

func NewNonRetriable added in v1.14.0

func NewNonRetriable(message string) error

func NonRetriable added in v1.14.0

func NonRetriable(err error) error

Types

type ControllerRefManager added in v1.9.0

type ControllerRefManager[T kubeinterfaces.ObjectInterface] struct {
	kubecontroller.BaseControllerRefManager

	Control ControllerRefManagerControlInterface
	// contains filtered or unexported fields
}

func NewControllerRefManager added in v1.9.0

func NewControllerRefManager[T kubeinterfaces.ObjectInterface](
	ctx context.Context,
	controller metav1.Object,
	controllerGVK schema.GroupVersionKind,
	selector labels.Selector,
	control ControllerRefManagerControlInterface,
) *ControllerRefManager[T]

func (*ControllerRefManager[T]) AdoptObject added in v1.9.0

func (m *ControllerRefManager[T]) AdoptObject(obj T) error

func (*ControllerRefManager[T]) ClaimObjects added in v1.9.0

func (m *ControllerRefManager[T]) ClaimObjects(objects []T) (map[string]T, error)

func (*ControllerRefManager[T]) ReleaseObject added in v1.9.0

func (m *ControllerRefManager[T]) ReleaseObject(obj T) error

type ControllerRefManagerControlFuncs added in v1.9.0

type ControllerRefManagerControlFuncs struct {
	PatchObjectFunc           func(ctx context.Context, namespace string, name string, pt types.PatchType, data []byte, options metav1.PatchOptions) error
	GetControllerUncachedFunc func(ctx context.Context, namespace, name string) (metav1.Object, error)
}

func (ControllerRefManagerControlFuncs) GetControllerUncached added in v1.9.0

func (cf ControllerRefManagerControlFuncs) GetControllerUncached(ctx context.Context, namespace, name string) (metav1.Object, error)

func (ControllerRefManagerControlFuncs) PatchObject added in v1.9.0

func (cf ControllerRefManagerControlFuncs) PatchObject(ctx context.Context, namespace, name string, pt types.PatchType, data []byte, options metav1.PatchOptions) error

type ControllerRefManagerControlFuncsConverter added in v1.9.0

type ControllerRefManagerControlFuncsConverter[CT, T kubeinterfaces.ObjectInterface] struct {
	GetControllerUncachedFunc func(ctx context.Context, name string, opts metav1.GetOptions) (CT, error)
	PatchObjectFunc           func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (T, error)
}

func (ControllerRefManagerControlFuncsConverter[CT, T]) Convert added in v1.9.0

type ControllerRefManagerControlInterface added in v1.9.0

type ControllerRefManagerControlInterface interface {
	PatchObject(ctx context.Context, namespace, name string, pt types.PatchType, data []byte, options metav1.PatchOptions) error
	GetControllerUncached(ctx context.Context, namespace, name string) (metav1.Object, error)
}

type NonRetriableError added in v1.14.0

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

type Observer added in v1.14.0

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

func NewObserver added in v1.14.0

func NewObserver(name string, eventsClient corev1client.EventInterface, syncFunc ObserverSyncFunc) *Observer

func (*Observer) AddCachesToSync added in v1.14.0

func (o *Observer) AddCachesToSync(caches ...cache.InformerSynced)

func (*Observer) AddHandler added in v1.14.0

func (o *Observer) AddHandler(obj interface{})

func (*Observer) DeleteHandler added in v1.14.0

func (o *Observer) DeleteHandler(obj interface{})

func (*Observer) Enqueue added in v1.14.0

func (o *Observer) Enqueue()

func (*Observer) GetGenericHandlers added in v1.14.0

func (o *Observer) GetGenericHandlers() cache.ResourceEventHandlerFuncs

func (*Observer) Name added in v1.14.0

func (o *Observer) Name() string

func (*Observer) Run added in v1.14.0

func (o *Observer) Run(ctx context.Context)

func (*Observer) UpdateHandler added in v1.14.0

func (o *Observer) UpdateHandler(old, new interface{})

type ObserverSyncFunc added in v1.14.0

type ObserverSyncFunc = func(ctx context.Context) error

Jump to

Keyboard shortcuts

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