metrics

package
v0.0.0-...-0999c01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 3 Imported by: 0

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL