MCPcopy Index your code
hub / github.com/prometheus/prometheus / parseQuery

Method parseQuery

web/api/v1/api.go:597–604  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

595}
596
597func (api *API) parseQuery(r *http.Request) apiFuncResult {
598 expr, err := api.parser.ParseExpr(r.FormValue("query"))
599 if err != nil {
600 return invalidParamError(err, "query")
601 }
602
603 return apiFuncResult{data: translateAST(expr), err: nil, warnings: nil, finalizer: nil}
604}
605
606func extractQueryOpts(r *http.Request) (promql.QueryOpts, error) {
607 var duration time.Duration

Callers

nothing calls this directly

Calls 3

invalidParamErrorFunction · 0.85
translateASTFunction · 0.85
ParseExprMethod · 0.65

Tested by

no test coverage detected