graphiteql

package
v1.101.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuoteString

func QuoteString(s string) string

QuoteString quotes s, so it could be used in Graphite queries.

Types

type ArgExpr

type ArgExpr struct {
	// Name is named arg name. It is empty for positional arg.
	Name string

	// Expr arg expression.
	Expr Expr
}

ArgExpr represents function arg (which may be named).

func (*ArgExpr) AppendString

func (ae *ArgExpr) AppendString(dst []byte) []byte

AppendString appends string representation of ae to dst and returns the result.

type BoolExpr

type BoolExpr struct {
	// B is bool value
	B bool
}

BoolExpr contains bool value (True or False).

func (*BoolExpr) AppendString

func (be *BoolExpr) AppendString(dst []byte) []byte

AppendString appends string representation of be to dst and returns the result.

type Expr

type Expr interface {
	// AppendString appends Expr contents to dst and returns the result.
	AppendString(dst []byte) []byte
}

Expr is Graphite expression for render API.

func Parse

func Parse(s string) (Expr, error)

Parse parses Graphite render API target expression.

See https://graphite.readthedocs.io/en/stable/render_api.html

type FuncExpr

type FuncExpr struct {
	// FuncName is the function name
	FuncName string

	// Args is function args.
	Args []*ArgExpr
	// contains filtered or unexported fields
}

FuncExpr represents function call.

func (*FuncExpr) AppendString

func (fe *FuncExpr) AppendString(dst []byte) []byte

AppendString appends string representation of fe to dst and returns the result.

type MetricExpr

type MetricExpr struct {
	// Query is the query for fetching metrics.
	Query string
}

MetricExpr represents metric expression.

func (*MetricExpr) AppendString

func (me *MetricExpr) AppendString(dst []byte) []byte

AppendString append string representation of me to dst and returns the result.

type NoneExpr

type NoneExpr struct{}

NoneExpr contains None value

func (*NoneExpr) AppendString

func (nne *NoneExpr) AppendString(dst []byte) []byte

AppendString appends string representation of nne to dst and returns the result.

type NumberExpr

type NumberExpr struct {
	// N is float64 constant
	N float64
}

NumberExpr contains float64 constant.

func (*NumberExpr) AppendString

func (ne *NumberExpr) AppendString(dst []byte) []byte

AppendString appends string representation of ne to dst and returns the result.

type StringExpr

type StringExpr struct {
	// S contains unquoted string contents.
	S string
}

StringExpr represents string constant.

func (*StringExpr) AppendString

func (se *StringExpr) AppendString(dst []byte) []byte

AppendString appends se to dst and returns the result.

Jump to

Keyboard shortcuts

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