prometheus

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	ActiveAt    time.Time
	Annotations map[string]string
	Labels      map[string]string
	State       string
	Value       string
}

type Alerts

type Alerts []Alert

func FilterAlerts added in v0.2.0

func FilterAlerts(alerts Alerts, inhibitedAlerts []string) (Alerts, error)

type BasicAuthDetails

type BasicAuthDetails struct {
	Username string
	Password string
}

type Client

type Client interface {
	GetAlerts() (Alerts, error)
}

func NewClientFromScrapeConfig added in v0.2.0

func NewClientFromScrapeConfig(config *db.ScrapeConfig) Client

func NewPrometheusClient

func NewPrometheusClient(client http.Client, endpoint string) Client

func NewPrometheusClientWithBasicAuth

func NewPrometheusClientWithBasicAuth(client http.Client, endpoint string, creds *BasicAuthDetails) Client

type ClientFactory added in v0.2.0

type ClientFactory func(config *db.ScrapeConfig) Client

type Response

type Response struct {
	Data struct {
		Alerts []Alert `json:"alerts"`
	} `json:"data"`
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

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