metrics

package
v0.0.0-...-3da42c7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegacyQueryParser

type LegacyQueryParser struct {
	// contains filtered or unexported fields
}

LegacyQueryParser will parse an old format un-encoded metrics query string (usually found in sli.yaml files)

func NewLegacyQueryParser

func NewLegacyQueryParser(query string) *LegacyQueryParser

NewLegacyQueryParser creates a new LegacyQueryParser for the specified old format un-encoded metrics query string.

func (*LegacyQueryParser) Parse

func (p *LegacyQueryParser) Parse() (*metrics.Query, error)

Parse parses the old format with "<metric_selector>:<some_filters()>?scope=<scope>" into a metrics query or returns an error. Scope is optional.

type QueryParser

type QueryParser struct {
	// contains filtered or unexported fields
}

QueryParser will parse an un-encoded metrics query string (usually found in sli.yaml files) into a Query

func NewQueryParser

func NewQueryParser(query string) *QueryParser

NewQueryParser creates a new QueryParser for the specified query string.

func (*QueryParser) Parse

func (p *QueryParser) Parse() (*metrics.Query, error)

Parse parses an un-encoded metrics query string (usually found in sli.yaml files) into a Query or returns an error. It only supports the current Metrics API V2 format (without a '?' prefix)

type QueryProducer

type QueryProducer struct {
	// contains filtered or unexported fields
}

QueryProducer for metrics queries.

func NewQueryProducer

func NewQueryProducer(query metrics.Query) QueryProducer

NewQueryProducer creates a QueryProducer the specified metrics Query.

func (QueryProducer) Produce

func (b QueryProducer) Produce() string

Produce returns the unencoded metrics query string for a Query.

Jump to

Keyboard shortcuts

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