Documentation
¶
Index ¶
- 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 MatchInformation
- type ParsePromCompressedRequestResult
- type PromDebug
- type Response
- type Result
- type Tags
- type TimeoutOpts
- type Value
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRequestTimeout ¶
ParseRequestTimeout parses the input request timeout with a default.
func ParseSeriesMatchQuery ¶
func ParseSeriesMatchQuery( r *http.Request, tagOptions models.TagOptions, ) ([]*storage.FetchQuery, *xhttp.ParseError)
ParseSeriesMatchQuery parses all params from the GET request.
func ParseTagCompletionParamsToQuery ¶
func ParseTagCompletionParamsToQuery( r *http.Request, ) (*storage.CompleteTagsQuery, *xhttp.ParseError)
ParseTagCompletionParamsToQuery parses all params from the GET request.
func RenderListTagResultsJSON ¶
func RenderListTagResultsJSON( w io.Writer, result *storage.CompleteTagsResult, ) error
RenderListTagResultsJSON renders list tag results to json format.
func RenderSeriesMatchResultsJSON ¶
RenderSeriesMatchResultsJSON renders series match results to json format.
func RenderTagCompletionResultsJSON ¶
func RenderTagCompletionResultsJSON( w io.Writer, result *storage.CompleteTagsResult, ) error
RenderTagCompletionResultsJSON renders tag completion results to json format.
func RenderTagValuesResultsJSON ¶
func RenderTagValuesResultsJSON( w io.Writer, result *storage.CompleteTagsResult, ) error
RenderTagValuesResultsJSON renders tag values results to json format.
Types ¶
type MatchInformation ¶
type MatchInformation struct {
// FullMatch indicates a full match.
FullMatch bool
// NoMatch indicates that the responses do not match sufficiently.
NoMatch bool
}
MatchInformation describes how well two responses match.
type ParsePromCompressedRequestResult ¶
ParsePromCompressedRequestResult is the result of a ParsePromCompressedRequest call.
func ParsePromCompressedRequest ¶
func ParsePromCompressedRequest( r *http.Request, ) (ParsePromCompressedRequestResult, *xhttp.ParseError)
ParsePromCompressedRequest parses a snappy compressed request from Prometheus.
type Response ¶
type Response struct {
// Status is the response status.
Status string `json:"status"`
// Data is the response data.
Data data `json:"data"`
}
Response represents Prometheus's query response.
type Result ¶
type Result struct {
// Metric is the tags for the result.
Metric Tags `json:"metric"`
// Values is the set of values for the result.
Values Values `json:"values"`
// contains filtered or unexported fields
}
Result is the result itself.
type TimeoutOpts ¶
TimeoutOpts stores options related to various timeout configurations.