Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSyntax = errors.New("invalid syntax")
ErrSyntax indicates that a value does not have the right syntax for the target type.
Functions ¶
func GraphLinkForExpression ¶
GraphLinkForExpression creates an escaped relative link to the graph view of the provided expression.
func SanitizeLabelName ¶
SanitizeLabelName replaces anything that doesn't match client_label.LabelNameRE with an underscore.
func TableLinkForExpression ¶
TableLinkForExpression creates an escaped relative link to the table view of the provided expression.
func Unquote ¶
Unquote interprets s as a single-quoted, double-quoted, or backquoted Prometheus query language string literal, returning the string value that s quotes.
NOTE: This function as well as the necessary helper functions below (unquoteChar, contains, unhex) and associated tests have been adapted from the corresponding functions in the "strconv" package of the Go standard library to work for Prometheus-style strings. Go's special-casing for single quotes was removed and single quoted strings are now treated the same as double quoted ones.
Types ¶
This section is empty.