Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuoteString ¶
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 ¶
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 ¶
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.
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 ¶
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 ¶
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.