metric

package
v0.0.0-...-d0f20ad Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interval

type Interval struct {
	OldestInclusive clientmodel.Timestamp
	NewestInclusive clientmodel.Timestamp
}

Interval describes the inclusive interval between two Timestamps.

type LabelMatcher

type LabelMatcher struct {
	Type  MatchType
	Name  clientmodel.LabelName
	Value clientmodel.LabelValue
	// contains filtered or unexported fields
}

LabelMatcher models the matching of a label.

func NewLabelMatcher

func NewLabelMatcher(matchType MatchType, name clientmodel.LabelName, value clientmodel.LabelValue) (*LabelMatcher, error)

NewLabelMatcher returns a LabelMatcher object ready to use.

func (*LabelMatcher) Filter

Filter takes a list of label values and returns all label values which match the label matcher.

func (*LabelMatcher) Match

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 LabelPair

type LabelPair struct {
	Name  clientmodel.LabelName
	Value clientmodel.LabelValue
}

LabelPair pairs a name with a value.

func (*LabelPair) Equal

func (l *LabelPair) Equal(o *LabelPair) bool

Equal returns true iff both the Name and the Value of this LabelPair and o are equal.

type LabelPairs

type LabelPairs []*LabelPair

LabelPairs is a sortable slice of LabelPair pointers. It implements sort.Interface.

func (LabelPairs) Len

func (l LabelPairs) Len() int

func (LabelPairs) Less

func (l LabelPairs) Less(i, j int) bool

func (LabelPairs) Swap

func (l LabelPairs) Swap(i, j int)

type MatchType

type MatchType int

MatchType is an enum for label matching types.

const (
	Equal MatchType = iota
	NotEqual
	RegexMatch
	RegexNoMatch
)

Possible MatchTypes.

func (MatchType) String

func (m MatchType) String() string

type SamplePair

type SamplePair struct {
	Timestamp clientmodel.Timestamp
	Value     clientmodel.SampleValue
}

SamplePair pairs a SampleValue with a Timestamp.

func (*SamplePair) Equal

func (s *SamplePair) Equal(o *SamplePair) bool

Equal returns true if this SamplePair and o have equal Values and equal Timestamps.

func (SamplePair) MarshalJSON

func (s SamplePair) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SamplePair) String

func (s *SamplePair) String() string

type Values

type Values []SamplePair

Values is a slice of SamplePairs.

Jump to

Keyboard shortcuts

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