matcher

package
v0.0.0-...-69690f0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesAny

func MatchesAny(lbls map[string]string, matchers []Matchers) bool

MatchesAny returns whether at least one matchers matches.

func MatchesAnyLabels

func MatchesAnyLabels(lbls labels.Labels, matchers []Matchers) bool

MatchesAnyLabels returns whether at least one matchers matches.

Types

type Matchers

type Matchers []*labels.Matcher

func MatchersFromQuery

func MatchersFromQuery(query parser.Expr) []Matchers

func NormalizeMetric

func NormalizeMetric(metric string) (Matchers, error)

func (*Matchers) Add

func (m *Matchers) Add(label string, value string, labelType labels.MatchType) error

Add will add a new matcher to the metric.

func (*Matchers) Get

func (m *Matchers) Get(label string) *labels.Matcher

Get returns a matcher with the specided label as Name. nil will be returned if not matcher were found.

func (*Matchers) Matches

func (m *Matchers) Matches(lbls map[string]string) bool

func (*Matchers) MatchesLabels

func (m *Matchers) MatchesLabels(lbls map[string]string) bool

func (*Matchers) String

func (m *Matchers) String() string

Jump to

Keyboard shortcuts

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