Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
parser.Expr
InternalMatrix *parser.MatrixSelector
RangeAsVariable string
}
func (*Builder) PositionRange ¶
func (b *Builder) PositionRange() posrange.PositionRange
func (*Builder) PromQLExpr ¶
func (b *Builder) PromQLExpr()
PromQLExpr ensures that no other types accidentally implement the interface.
type Option ¶
type Option func(matrix *Builder)
func WithRangeAsString ¶
WithRangeAsString sets the range as a string like "3h2m1s".
func WithRangeAsVariable ¶
WithRangeAsVariable sets the range as a variable name. It will be useful in case you are writing a query for a dashboard and the range is a variable like "$__rate_interval". Use it if your range is not correct in terms of PromQL syntax.
Click to show internal directories.
Click to hide internal directories.