generic

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package generic contains helper functions useful for working with the generic controller-runtime APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GVKForType

func GVKForType[T client.Object](scheme *runtime.Scheme) schema.GroupVersionKind

GVKForType returns the GroupVersionKind for a given type T registered in the scheme. It panics if the type is not registered or there is more than one GVK for the type.

func NewPredicateFuncs

func NewPredicateFuncs[T client.Object](f func(T) bool) predicate.TypedFuncs[client.Object]

NewPredicateFuncs is a wrapper around predicate.NewTypedPredicateFuncs[T] that converts the typed predicate functions back to untyped variants, suitable for use in the current controller-runtime API.

When controller-runtime is updated to use generic builders, this function can be removed. See https://github.com/kubernetes-sigs/controller-runtime/pull/2784

Types

This section is empty.

Jump to

Keyboard shortcuts

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