Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryResult ¶ added in v0.8.2
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) GetMatrix ¶ added in v0.8.2
func (qr *QueryResult) GetMatrix() (*model.Matrix, error)
func (*QueryResult) GetVector ¶ added in v0.8.2
func (qr *QueryResult) GetVector() (*model.Vector, error)
func (*QueryResult) UnmarshalJSON ¶ added in v0.8.2
func (qr *QueryResult) UnmarshalJSON(b []byte) error
Unmarshalling for `queryResult`
type Response ¶ added in v0.8.2
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
func UnmarshallPrometheusWebResponse ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.