mv2

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MV2Prefix = "MV2"

MV2Prefix is the prefix of MV2 queries

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

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

Query encapsulates a MV2 query-

func NewQuery

func NewQuery(unit string, query metrics.Query) (*Query, error)

NewQuery creates a Query from the specified unit and metrics query or returns an error.

func (*Query) GetQuery

func (q *Query) GetQuery() metrics.Query

GetQuery gets the query.

func (*Query) GetUnit

func (q *Query) GetUnit() string

GetUnit gets the unit.

type QueryParser

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

QueryParser will parse a MV2 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 MV2 query string.

func (QueryParser) Parse

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

Parse parses the query string into a Query or returns an error.

type QueryProducer

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

QueryProducer for MV2 queries.

func NewQueryProducer

func NewQueryProducer(query Query) QueryProducer

NewQueryProducer creates a QueryProducer for the specified MV2 Query.

func (QueryProducer) Produce

func (p QueryProducer) Produce() string

Produce returns the MV2 query string for a Query.

Jump to

Keyboard shortcuts

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