Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { URL string `hcl:"url"` Timeout int `hcl:"timeout,optional"` Interval int `hcl:"interval,optional"` Query string `hcl:"query"` }
Config struct
func (Config) IntervalDuration ¶
IntervalDuration return interval in second
func (Config) TimeoutDuration ¶
TimeoutDuration return timeout in second
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider struct
type QueryData ¶
type QueryData struct { ResultType ValueType `json:"resultType"` Result json.RawMessage `json:"result"` }
QueryData struct
type Response ¶
type Response struct { Status StatusType `json:"status"` Data QueryData `json:"data,omitempty"` ErrorType ErrorType `json:"errorType,omitempty"` Error string `json:"error,omitempty"` Warnings []string `json:"warnings,omitempty"` }
type ResultVector ¶
type ResultVector struct { Metric json.RawMessage `json:"metric"` Value []interface{} `json:"value"` }
type ResultVectorType ¶
type ResultVectorType []ResultVector
type StatusType ¶
type StatusType string
const ( StatusTypeSuccess StatusType = "success" StatusTypeError StatusType = "error" )
Click to show internal directories.
Click to hide internal directories.