utils

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientObjectGetter

func ClientObjectGetter[ObjPtr ObjectPtr[Obj], Obj any](
	ctx context.Context,
	c client.Client,
	namespace string,
) func(name string) (ObjPtr, error)

func ObjectByNameGetter

func ObjectByNameGetter[Obj client.Object](resource schema.GroupResource, objectByName map[string]Obj) func(name string) (Obj, error)

func ObjectSliceToByNameGetter

func ObjectSliceToByNameGetter[S ~[]E, ObjPtr ObjectPtr[E], E any](resource schema.GroupResource, objs S) func(name string) (ObjPtr, error)

func ObjectSliceToMapByName

func ObjectSliceToMapByName[S ~[]E, ObjPtr ObjectPtr[E], E any](objs S) map[string]ObjPtr

func PrepareDownwardAPILabels added in v0.2.4

func PrepareDownwardAPILabels(
	labelSource map[string]string,
	downwardAPILabels map[string]string,
	prefix string,
) map[string]string

Types

type ObjectPtr

type ObjectPtr[E any] interface {
	*E
	client.Object
}

Jump to

Keyboard shortcuts

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