Browse Source

PromQL: export function list (#6434)

This PR exports the list of supported PromQL functions and their signatures.

The reason for that is that the PromQL language server likes to use that list.

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
pull/6435/head
Tobias Guggenmos 5 years ago committed by Brian Brazil
parent
commit
cd39ebe7c6
  1. 5
      promql/functions.go

5
promql/functions.go

@ -907,7 +907,8 @@ func funcYear(vals []Value, args Expressions, enh *EvalNodeHelper) Vector {
})
}
var functions = map[string]*Function{
// Functions is a list of all functions supported by PromQL, including their types.
var Functions = map[string]*Function{
"abs": {
Name: "abs",
ArgTypes: []ValueType{ValueTypeVector},
@ -1197,7 +1198,7 @@ var functions = map[string]*Function{
// getFunction returns a predefined Function object for the given name.
func getFunction(name string) (*Function, bool) {
function, ok := functions[name]
function, ok := Functions[name]
return function, ok
}

Loading…
Cancel
Save