Documentation ¶
Index ¶
- Constants
- 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.SeriesMatchQuery, *xhttp.ParseError)
- func ParseTagCompletionParamsToQuery(r *http.Request) (*storage.CompleteTagsQuery, *xhttp.ParseError)
- func ParseTagValuesToQuery(r *http.Request) (*storage.CompleteTagsQuery, error)
- func RenderSeriesMatchResultsJSON(w io.Writer, results []*storage.CompleteTagsResult) 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 ¶
const (
// NameReplace is the parameter that gets replaced
NameReplace = "name"
)
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.SeriesMatchQuery, *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 ParseTagValuesToQuery ¶ added in v0.5.0
func ParseTagValuesToQuery( r *http.Request, ) (*storage.CompleteTagsQuery, error)
ParseTagValuesToQuery parses a tag values request to a complete tags query
func RenderSeriesMatchResultsJSON ¶ added in v0.5.0
func RenderSeriesMatchResultsJSON( w io.Writer, results []*storage.CompleteTagsResult, ) error
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