mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
97c7fffbb8
In Thanos we would like to start experimenting with custom functions that are currently not part of the PromQL spec. We would do this by adding an implementation for those functions in the Thanos engine: https://github.com/thanos-community/promql-engine and allow users to decide which engine they want to use on a per-query basis. Since we use the PromQL parser from Prometheus, injecting functions in the global `Functions` variable would mean they also become available for the Prometheus engine. To avoid this side-effect, this commit exposes a Parser interface in which the supported functions can be injected as an option. If not functions are injected, the parser implementation will default to the functions defined in the global Functions variable. Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com> |
||
---|---|---|
.. | ||
ast.go | ||
functions.go | ||
generated_parser.y | ||
generated_parser.y.go | ||
lex.go | ||
lex_test.go | ||
parse.go | ||
parse_test.go | ||
prettier.go | ||
prettier_rules.md | ||
prettier_test.go | ||
printer.go | ||
printer_test.go | ||
value.go |