Documentation ¶
Index ¶
- func AddEventHandlers(informer cache.SharedInformer, a addFunc, u updateFunc, d deleteFunc) (cache.ResourceEventHandlerRegistration, error)
- func AddEventHandlersT[T any](informer cache.SharedInformer, a addFuncT[T], u updateFuncT[T], ...) (cache.ResourceEventHandlerRegistration, error)
- func AddFunc(logger logr.Logger, enqueue EnqueueFunc) addFunc
- func AddFuncT[K metav1.Object](logger logr.Logger, enqueue EnqueueFuncT[K]) addFuncT[K]
- func CheckLabel(obj metav1.Object, key, value string) bool
- func Cleanup[T any, R Object[T]](ctx context.Context, actual []R, expected []R, deleter Deleter) error
- func CreateOrUpdate[T any, R Object[T], G Getter[R], S Setter[R]](ctx context.Context, name string, getter G, setter S, build func(R) error) (R, error)
- func DeleteFunc(logger logr.Logger, enqueue EnqueueFunc) deleteFunc
- func DeleteFuncT[K metav1.Object](logger logr.Logger, enqueue EnqueueFuncT[K]) deleteFuncT[K]
- func ExplicitKey[K any](parseKey func(K) cache.ExplicitKey) keyFunc
- func GetAnnotation(obj metav1.Object, key string) string
- func GetLabel(obj metav1.Object, key string) string
- func GetOrNew[T any, R Object[T], G Getter[R]](name string, getter G) (R, error)
- func HasAnnotation(obj metav1.Object, key string) bool
- func HasLabel(obj metav1.Object, key string) bool
- func IsManagedByKyverno(obj metav1.Object) bool
- func MetaNamespaceKey(obj interface{}) (interface{}, error)
- func MetaNamespaceKeyT[T any](obj T) (interface{}, error)
- func MetaObjectToName(obj metav1.Object) string
- func Run(ctx context.Context, logger logr.Logger, controllerName string, ...)
- func SelectorNotManagedByKyverno() (labels.Selector, error)
- func SetAnnotation(obj metav1.Object, key, value string)
- func SetLabel(obj metav1.Object, key, value string) map[string]string
- func SetManagedByKyvernoLabel(obj metav1.Object)
- func SetOwner(obj metav1.Object, apiVersion, kind, name string, uid types.UID)
- func Update[T interface{ ... }, S UpdateClient[T]](ctx context.Context, obj T, setter S, build func(T) error) (T, error)
- func UpdateFunc(logger logr.Logger, enqueue EnqueueFunc) updateFunc
- func UpdateFuncT[K metav1.Object](logger logr.Logger, enqueue EnqueueFuncT[K]) updateFuncT[K]
- func UpdateStatus[T interface{ ... }, S ObjectStatusClient[T]](ctx context.Context, obj T, setter S, build func(T) error, cmp func(T, T) bool) error
- type CreateClient
- type DeepCopy
- type DeleteClient
- type DeleteCollectionClient
- type Deleter
- type EnqueueFunc
- func AddDefaultEventHandlers(logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
- func AddDelayedDefaultEventHandlers(logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
- func AddDelayedExplicitEventHandlers[K any](logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
- func AddDelayedKeyedEventHandlers(logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
- func AddExplicitEventHandlers[K any](logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
- func AddKeyedEventHandlers(logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
- func Queue(queue workqueue.TypedRateLimitingInterface[any]) EnqueueFunc
- func QueueAfter(queue workqueue.TypedRateLimitingInterface[any], delay time.Duration) EnqueueFunc
- type EnqueueFuncT
- func AddDefaultEventHandlersT[K metav1.Object](logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFuncT[K], cache.ResourceEventHandlerRegistration, error)
- func AddKeyedEventHandlersT[K metav1.Object](logger logr.Logger, informer cache.SharedInformer, ...) (EnqueueFuncT[K], cache.ResourceEventHandlerRegistration, error)
- func LogError[K any](logger logr.Logger, inner EnqueueFuncT[K]) EnqueueFuncT[K]
- func Parse[K, L any](parseKey keyFuncT[K, L], inner EnqueueFuncT[L]) EnqueueFuncT[K]
- type GetClient
- type Getter
- type ListClient
- type Object
- type ObjectClient
- type ObjectListClient
- type ObjectListStatusClient
- type ObjectStatusClient
- type PatchClient
- type Setter
- type StatusClient
- type UpdateClient
- type WatchClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEventHandlers ¶
func AddEventHandlers(informer cache.SharedInformer, a addFunc, u updateFunc, d deleteFunc) (cache.ResourceEventHandlerRegistration, error)
func AddEventHandlersT ¶ added in v1.8.1
func AddEventHandlersT[T any](informer cache.SharedInformer, a addFuncT[T], u updateFuncT[T], d deleteFuncT[T]) (cache.ResourceEventHandlerRegistration, error)
func CreateOrUpdate ¶
func DeleteFunc ¶
func DeleteFuncT ¶ added in v1.9.0
func ExplicitKey ¶
func ExplicitKey[K any](parseKey func(K) cache.ExplicitKey) keyFunc
func IsManagedByKyverno ¶ added in v1.9.0
func MetaNamespaceKey ¶
func MetaNamespaceKey(obj interface{}) (interface{}, error)
func MetaNamespaceKeyT ¶ added in v1.9.0
func MetaObjectToName ¶ added in v1.10.5
func SelectorNotManagedByKyverno ¶ added in v1.9.0
func SetAnnotation ¶
func SetManagedByKyvernoLabel ¶ added in v1.9.0
func UpdateFunc ¶
func UpdateFuncT ¶ added in v1.9.0
Types ¶
type CreateClient ¶ added in v1.8.1
type DeleteClient ¶ added in v1.8.1
type DeleteCollectionClient ¶ added in v1.8.1
type DeleteCollectionClient interface {
DeleteCollection(context.Context, metav1.DeleteOptions, metav1.ListOptions) error
}
type EnqueueFunc ¶
type EnqueueFunc = EnqueueFuncT[interface{}]
func AddDefaultEventHandlers ¶
func AddDefaultEventHandlers(logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any]) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
func AddDelayedDefaultEventHandlers ¶
func AddDelayedDefaultEventHandlers(logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any], delay time.Duration) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
func AddDelayedExplicitEventHandlers ¶
func AddDelayedExplicitEventHandlers[K any](logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any], delay time.Duration, parseKey func(K) cache.ExplicitKey) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
func AddDelayedKeyedEventHandlers ¶
func AddDelayedKeyedEventHandlers(logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any], delay time.Duration, parseKey keyFunc) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
func AddExplicitEventHandlers ¶
func AddExplicitEventHandlers[K any](logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any], parseKey func(K) cache.ExplicitKey) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
func AddKeyedEventHandlers ¶
func AddKeyedEventHandlers(logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any], parseKey keyFunc) (EnqueueFunc, cache.ResourceEventHandlerRegistration, error)
func Queue ¶
func Queue(queue workqueue.TypedRateLimitingInterface[any]) EnqueueFunc
func QueueAfter ¶
func QueueAfter(queue workqueue.TypedRateLimitingInterface[any], delay time.Duration) EnqueueFunc
type EnqueueFuncT ¶ added in v1.8.1
func AddDefaultEventHandlersT ¶ added in v1.9.0
func AddDefaultEventHandlersT[K metav1.Object](logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any]) (EnqueueFuncT[K], cache.ResourceEventHandlerRegistration, error)
func AddKeyedEventHandlersT ¶ added in v1.9.0
func AddKeyedEventHandlersT[K metav1.Object](logger logr.Logger, informer cache.SharedInformer, queue workqueue.TypedRateLimitingInterface[any], parseKey keyFuncT[K, interface{}]) (EnqueueFuncT[K], cache.ResourceEventHandlerRegistration, error)
type ListClient ¶ added in v1.8.1
type ObjectClient ¶ added in v1.8.1
type ObjectClient[T metav1.Object] interface { CreateClient[T] GetClient[T] UpdateClient[T] PatchClient[T] DeleteClient DeleteCollectionClient }
type ObjectListClient ¶ added in v1.8.1
type ObjectListClient[T metav1.Object, L any] interface { ObjectClient[T] ListClient[L] }
type ObjectListStatusClient ¶ added in v1.8.1
type ObjectListStatusClient[T metav1.Object, L any] interface { ObjectClient[T] ListClient[L] StatusClient[T] }
type ObjectStatusClient ¶ added in v1.8.1
type ObjectStatusClient[T metav1.Object] interface { ObjectClient[T] StatusClient[T] }
type PatchClient ¶ added in v1.8.1
type StatusClient ¶ added in v1.8.1
type UpdateClient ¶ added in v1.8.1
type WatchClient ¶ added in v1.8.1
Click to show internal directories.
Click to hide internal directories.