controllertools

package
v1.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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)
}

Jump to

Keyboard shortcuts

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