parser

package
v9.4.32+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NoLabel = "NoLabel"
)

Variables

This section is empty.

Functions

func HasAnyLabel

func HasAnyLabel(set, subset map[string]string) bool

HasAnyLabel returns true if atleast of kv pair of subset exists in set.

func HasAnyLabelKey

func HasAnyLabelKey(set, subset map[string]string) bool

HasAnyLabel returns true if atleast one key from subset exists in set.

func HasLabelKeys

func HasLabelKeys(set, subset map[string]string) bool

HasLabelKeys returns true if subset keys exist in set

func HasLabels

func HasLabels(set, subset map[string]string) bool

HasLabels returns true if subset kv mappings exist in set

func LabelsFromString

func LabelsFromString(str string) (map[string]string, error)

LabelsFromString "key1=value1,key2,key3=value3" to a key-value map.

func LabelsToString

func LabelsToString(labels map[string]string) string

LabeToString convert key-value map to "key1=value1,key2,key3=value3"

func MergeLabels

func MergeLabels(old map[string]string, new map[string]string) map[string]string

MergeLabels merge 2 key-value map to single key value map, overriding keys in old.

Types

This section is empty.

Jump to

Keyboard shortcuts

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