Documentation ¶
Overview ¶
Package parsing contains methods for parsing strings into various types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromPromLabelsToMutingMatchers ¶
func FromPromLabelsToMutingMatchers(s string) ([]*models.Configv1MutingRuleLabelMatcher, error)
FromPromLabelsToMutingMatchers converts a string representing labels in Prometheus format to a list of muting matchers.
func OpToMutingMatcherType ¶
func OpToMutingMatcherType(op string) (models.Configv1MutingRuleLabelMatcherMatcherType, error)
OpToMutingMatcherType converts an op string to a entities MutingMatcherType
func PromLabelParser ¶
func PromLabelParser() *participle.Parser
PromLabelParser returns a parser for PromLabels
Types ¶
type PromLabel ¶
type PromLabel struct { Name string `@Ident` //nolint:govet Op string `@(("=" "~") | "=" | ("!" "=") | ("!" "~"))` //nolint:govet Value string `@String` //nolint:govet }
PromLabel represents a single key-value pair.
type PromLabels ¶
type PromLabels struct {
Labels []PromLabel `"{" ( @@ ","? )* "}"` //nolint:govet
}
PromLabels represents a list of key-value labels surrounded by brackets.
Click to show internal directories.
Click to hide internal directories.