promql

package
v1.23.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MatchEqual     MatchType = "="
	MatchNotEqual            = "!="
	MatchRegexp              = "=~"
	MatchNotRegexp           = "!~"
)

Possible MatchTypes.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelMatcher added in v1.23.0

type LabelMatcher struct {
	Type  MatchType `json:"type"`
	Name  string    `json:"name"`
	Value string    `json:"value"`
}

func RemoveDuplicated

func RemoveDuplicated(ms []LabelMatcher) []LabelMatcher

func (*LabelMatcher) String added in v1.23.0

func (m *LabelMatcher) String() string

func (*LabelMatcher) ToPromqlLabelMatcher added in v1.23.0

func (m *LabelMatcher) ToPromqlLabelMatcher() *labels.Matcher

type MatchType added in v1.23.0

type MatchType string

MatchType is an enum for label matching types.

type Query

type Query struct {
	parser.Expr
	// contains filtered or unexported fields
}

func New

func New(promql string) (*Query, error)

func (*Query) AddLabelMatchers added in v1.22.0

func (q *Query) AddLabelMatchers(matchers ...*labels.Matcher) *Query

func (*Query) GetVectorSelectors added in v1.22.0

func (q *Query) GetVectorSelectors() []string

func (*Query) String added in v1.22.0

func (q *Query) String() string

func (*Query) Sumby added in v1.22.0

func (q *Query) Sumby(labels ...string) *Query

Jump to

Keyboard shortcuts

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