annotation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncSuccessTimestamp      = "syncSuccessTimestamp"
	LastGeneration            = "lastGeneration"
	LastSyncSuccessGeneration = "lastSyncSuccessGeneration"
)

Variables

This section is empty.

Functions

func AddAnnotation

func AddAnnotation(obj metav1.Object, key, value string) (bool, error)

AddAnnotation adds the given annotation key and value to the given objects ObjectMeta, and overwrites the annotation value if it already exists. Returns true if the object was updated.

func CopySubmap

func CopySubmap(src, dest map[string]string, matcher func(key string) bool) (newDest map[string]string, numChanges int)

CopySubmap copies keys matched by matcher from src to dest and returns number of entries changed in dest. src and dest may be nil. If dest is non-nil, dest == newDest. Otherwise, if any key in keys exist in src, newDest is a new map.

func HasAnnotationKey

func HasAnnotationKey(obj metav1.Object, key string) (bool, error)

HasAnnotationKey returns true if the given object has the given annotation key in its ObjectMeta.

func HasAnnotationKeyValue

func HasAnnotationKeyValue(obj metav1.Object, key, value string) (bool, error)

HasAnnotationKeyValue returns true if the given object has the given annotation key and value in its ObjectMeta.

func IsNilPointer

func IsNilPointer(i interface{}) bool

IsNilPointer returns true if i is nil pointer or value of i is nil.

func RemoveAnnotation

func RemoveAnnotation(obj metav1.Object, key string) (bool, error)

RemoveAnnotation removes the given annotation key from the given objects ObjectMeta. Returns true if the object was updated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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