Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabelMatcher ¶
type LabelMatcher struct { Type MatchType Name model.LabelName Value model.LabelValue // contains filtered or unexported fields }
LabelMatcher models the matching of a label.
func NewLabelMatcher ¶
func NewLabelMatcher(matchType MatchType, name model.LabelName, value model.LabelValue) (*LabelMatcher, error)
NewLabelMatcher returns a LabelMatcher object ready to use.
func (*LabelMatcher) Filter ¶
func (m *LabelMatcher) Filter(in model.LabelValues) model.LabelValues
Filter takes a list of label values and returns all label values which match the label matcher.
func (*LabelMatcher) Match ¶
func (m *LabelMatcher) Match(v model.LabelValue) bool
Match returns true if the label matcher matches the supplied label value.
func (*LabelMatcher) String ¶
func (m *LabelMatcher) String() string
type LabelMatchers ¶
type LabelMatchers []*LabelMatcher
LabelMatchers is a slice of LabelMatcher objects.
type Metric ¶
Metric wraps a model.Metric and copies it upon modification if Copied is false.
func (*Metric) Del ¶
Del deletes a given label name from the wrapped Metric and copies the Metric initially, if it is not already a copy.
func (*Metric) Get ¶
func (m *Metric) Get(ln model.LabelName) model.LabelValue
Get the value for the given label name. An empty value is returned if the label does not exist in the metric.
func (*Metric) Gets ¶
Gets behaves as Get but the returned boolean is false iff the label does not exist.