Documentation
¶
Index ¶
- Constants
- func AddAnnotation(obj metav1.Object, key, value string) (bool, error)
- func CopySubmap(src, dest map[string]string, matcher func(key string) bool) (newDest map[string]string, numChanges int)
- func HasAnnotationKey(obj metav1.Object, key string) (bool, error)
- func HasAnnotationKeyValue(obj metav1.Object, key, value string) (bool, error)
- func IsNilPointer(i interface{}) bool
- func RemoveAnnotation(obj metav1.Object, key string) (bool, error)
Constants ¶
const ( SyncSuccessTimestamp = "syncSuccessTimestamp" LastGeneration = "lastGeneration" LastSyncSuccessGeneration = "lastSyncSuccessGeneration" )
Variables ¶
This section is empty.
Functions ¶
func AddAnnotation ¶
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 ¶
HasAnnotationKey returns true if the given object has the given annotation key in its ObjectMeta.
func HasAnnotationKeyValue ¶
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.
Types ¶
This section is empty.