promql

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenName

func GenName(query string) (string, error)

GenName generates a name for a promql expression used on Guance Dashboard

Types

type Rewriter

type Rewriter struct {
	Measurement string
}

Rewriter is a rewriter to convert Grafana-specific PromQL to MetricsQL on Guance Cloud

func NewRewriter added in v0.2.6

func NewRewriter(measurement string) *Rewriter

NewRewriter will create new Rewriter

func (*Rewriter) Rewrite

func (w *Rewriter) Rewrite(query string) (string, error)

Rewrite will rewrite a query from Grafana-specific PromQL to MetricsQL on Guance Cloud

func (*Rewriter) Visit

func (w *Rewriter) Visit(node parser.Node, path []parser.Node) (v parser.Visitor, err error)

Jump to

Keyboard shortcuts

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