util

package
v0.0.0-...-0443994 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetController

func GetController[T client.Object](ctx context.Context, c client.Client, scheme *runtime.Scheme, obj client.Object) (T, error)

GetController returns the object that controls the resource. If the object has no controller of the specified type then nil is returned.

func GetOwners

func GetOwners[T client.Object](ctx context.Context, c client.Client, scheme *runtime.Scheme, obj client.Object) ([]T, error)

GetObjects returns the objects of the selected type that are "owners" of the specified object. It will skip objects marked as "controllers"

func List

func List[T client.Object](ctx context.Context, client client.Client, opts ...client.ListOption) ([]T, error)

func NewObject

func NewObject[T client.Object]() (T, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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