Documentation ¶
Index ¶
- func ParsePromCompressedRequest(r *http.Request) ([]byte, *xhttp.ParseError)
- func ParseRequestTimeout(r *http.Request, configFetchTimeout time.Duration) (time.Duration, error)
- func ParseSeriesMatchQuery(r *http.Request, tagOptions models.TagOptions) ([]*storage.FetchQuery, *xhttp.ParseError)
- func ParseTagCompletionParamsToQuery(r *http.Request) (*storage.CompleteTagsQuery, *xhttp.ParseError)
- func RenderListTagResultsJSON(w io.Writer, result *storage.CompleteTagsResult) error
- func RenderSeriesMatchResultsJSON(w io.Writer, results []models.Metrics, dropRole bool) error
- func RenderTagCompletionResultsJSON(w io.Writer, result *storage.CompleteTagsResult) error
- func RenderTagValuesResultsJSON(w io.Writer, result *storage.CompleteTagsResult) error
- type PromDebug
- type PromResp
- type TimeoutOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePromCompressedRequest ¶
func ParsePromCompressedRequest(r *http.Request) ([]byte, *xhttp.ParseError)
ParsePromCompressedRequest parses a snappy compressed request from Prometheus.
func ParseRequestTimeout ¶
ParseRequestTimeout parses the input request timeout with a default.
func ParseSeriesMatchQuery ¶ added in v0.5.0
func ParseSeriesMatchQuery( r *http.Request, tagOptions models.TagOptions, ) ([]*storage.FetchQuery, *xhttp.ParseError)
ParseSeriesMatchQuery parses all params from the GET request.
func ParseTagCompletionParamsToQuery ¶ added in v0.5.0
func ParseTagCompletionParamsToQuery( r *http.Request, ) (*storage.CompleteTagsQuery, *xhttp.ParseError)
ParseTagCompletionParamsToQuery parses all params from the GET request.
func RenderListTagResultsJSON ¶ added in v0.9.0
func RenderListTagResultsJSON( w io.Writer, result *storage.CompleteTagsResult, ) error
RenderListTagResultsJSON renders list tag results to json format.
func RenderSeriesMatchResultsJSON ¶ added in v0.5.0
RenderSeriesMatchResultsJSON renders series match results to json format.
func RenderTagCompletionResultsJSON ¶ added in v0.5.0
func RenderTagCompletionResultsJSON( w io.Writer, result *storage.CompleteTagsResult, ) error
RenderTagCompletionResultsJSON renders tag completion results to json format.
func RenderTagValuesResultsJSON ¶ added in v0.5.0
func RenderTagValuesResultsJSON( w io.Writer, result *storage.CompleteTagsResult, ) error
RenderTagValuesResultsJSON renders tag values results to json format.
Types ¶
type PromDebug ¶ added in v0.5.0
PromDebug represents the input and output that are used in the debug endpoint.
type PromResp ¶ added in v0.5.0
type PromResp struct { Status string `json:"status"` Data struct { ResultType string `json:"resultType"` Result []struct { Metric map[string]string `json:"metric"` // todo(braskin): use `Datapoints` instead of interface{} in values // Values is [float, string] Values [][]interface{} `json:"values"` } `json:"result"` } `json:"data"` }
PromResp represents Prometheus's query response.
type TimeoutOpts ¶ added in v0.5.0
TimeoutOpts stores options related to various timeout configurations.