Documentation
¶
Index ¶
- func Get(obj runtime.Object, annotation string) string
- func GetAll(obj runtime.Object) map[string]string
- func Has(obj runtime.Object, annotation string) bool
- func Remove(obj runtime.Object, annotation ...string) error
- func RemoveAll(obj runtime.Object) error
- func Set(obj runtime.Object, annotation ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get get the annotation value of the provided k8s object for the specified annotation key. Return empty string if the object is not runtime.Object.
func GetAll ¶
GetAll get all annotations of the provided k8s object. Return nil if the provided object is not runtime.Object.
func Has ¶
Has will return true if the k8s object has specified annotation, otherwise return false. Label key and value separated by "=".
If the provided annotation only contains annotation key, then only to check whether the annotations of the k8s object contains the annotation key. If the provided annotation contains annotation key and value, then check whether the annotations of the k8s object contains the annotation key and value.
Types ¶
This section is empty.