Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
GetHttpHandler() http.Handler
RegisterMetric(metric prometheus.Collector)
}
func NewDefaultCollector ¶
func NewDefaultCollector() Collector
type CollectorDefault ¶
type CollectorDefault struct {
// contains filtered or unexported fields
}
func (*CollectorDefault) GetHttpHandler ¶
func (c *CollectorDefault) GetHttpHandler() http.Handler
func (*CollectorDefault) RegisterMetric ¶
func (c *CollectorDefault) RegisterMetric(metric prometheus.Collector)
type PrometheusResponse ¶
type PrometheusResponse struct {
Status string `json:"success"`
Data PrometheusResponseData `json:"data"`
}
type PrometheusResponseData ¶
type PrometheusResponseData struct {
Result []PrometheusResponseResult `json:"result"`
}
type PrometheusResponseMetric ¶
type PrometheusResponseMetric struct {
App string `json:"app"`
Country string `json:"country"`
Crawler string `json:"crawler"`
Endpoint string `json:"endpoint"`
Latitude string `json:"lat"`
Longitude string `json:"lon"`
Method string `json:"method"`
Status string `json:"status"`
IP string `json:"ip"`
}
type PrometheusResponseResult ¶
type PrometheusResponseResult struct {
Metric PrometheusResponseMetric `json:"metric"`
Value []interface{} `json:"value"`
}
Click to show internal directories.
Click to hide internal directories.