Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryResult ¶
type QueryResult struct { Type model.ValueType `json:"resultType"` Result interface{} `json:"result"` // The decoded value. V model.Value }
Struct for unmarshalling from github.com/prometheus/common/model
func UnmarshalPrometheusResponse ¶
func UnmarshalPrometheusResponse(data []byte) (*QueryResult, error)
func (*QueryResult) UnmarshalJSON ¶
func (qr *QueryResult) UnmarshalJSON(b []byte) error
Unmarshalling for `queryResult`
type Response ¶
type Response struct { Status status `json:"status"` Data interface{} `json:"data,omitempty"` ErrorType errorType `json:"errorType,omitempty"` Error string `json:"error,omitempty"` Warnings []string `json:"warnings,omitempty"` }
Generic struct for unmarshalling prometheus http api responses https://github.com/prometheus/prometheus/blob/bcd548c88b06543c8eeb19e68bef4adefb7b95fb/web/api/v1/api.go#L140
Click to show internal directories.
Click to hide internal directories.