prometheus

package
v0.0.0-...-596c4a4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromMetadataResponse

type PromMetadataResponse struct {
	Status string                      `json:"status"`
	Data   map[string][]PromMetricInfo `json:"data"`
}

type PromMetricInfo

type PromMetricInfo struct {
	Type string `json:"type"`
	Help string `json:"help"`
	Unit string `json:"unit"`
}

type PromMetricSeriesResponse

type PromMetricSeriesResponse struct {
	Status    string              `json:"status"`
	Data      []map[string]string `json:"data"`
	Err       string              `json:"error"`
	ErrorType string              `json:"errorType"`
}

func (*PromMetricSeriesResponse) Error

func (p *PromMetricSeriesResponse) Error() string

Error is response error

func (*PromMetricSeriesResponse) IsSuccessResponse

func (p *PromMetricSeriesResponse) IsSuccessResponse() bool

IsSuccessResponse is response success

type Prometheus

type Prometheus struct {
	// contains filtered or unexported fields
}

func New

func (*Prometheus) GetScrapeInterval

func (p *Prometheus) GetScrapeInterval() time.Duration

func (*Prometheus) Metadata

func (p *Prometheus) Metadata(ctx context.Context) (<-chan *datasource.MetricMetadata, error)

func (*Prometheus) Proxy

func (p *Prometheus) Proxy(ctx transporthttp.Context, target string) error

Proxy implements datasource.Metric.

Jump to

Keyboard shortcuts

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