prometheus

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregation

type Aggregation string
const (
	Avg   Aggregation = "avg"
	Max   Aggregation = "max"
	Min   Aggregation = "min"
	P99   Aggregation = "99"
	P95   Aggregation = "95"
	P90   Aggregation = "90"
	P50   Aggregation = "50"
	Stdev Aggregation = "stdev"
)

type Prometheus

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

Prometheus describes the prometheus connection

func NewClient

func NewClient(url, token, username, password string, tlsSkipVerify bool) (*Prometheus, error)

NewClient creates a prometheus struct instance with the given parameters

func (*Prometheus) Query

func (p *Prometheus) Query(query string, time time.Time) (model.Value, error)

Query prometheus query wrapper

func (*Prometheus) QueryRange

func (p *Prometheus) QueryRange(query string, start, end time.Time, step time.Duration) (model.Value, error)

QueryRange prometheus queryRange wrapper

Jump to

Keyboard shortcuts

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