prometheus

package
v0.0.0-...-b5e4fe0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client queries the prometheus metrics

func NewClient

func NewClient(addr string) (*Client, error)

NewClient creates the prometheus client.

func (*Client) LabelValues

func (c *Client) LabelValues(ctx context.Context, matcher string, label string, startTime time.Time, endTime time.Time) (model.LabelValues, error)

LabelValues returns all the values for the label by the matchers

func (*Client) Query

func (c *Client) Query(ctx context.Context, query string, startTime time.Time, endTime time.Time, step time.Duration) (model.Value, v1.Warnings, error)

Query queries the metric from start to end time with step.

func (*Client) Series

func (c *Client) Series(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) ([]model.LabelSet, v1.Warnings, error)

Series finds series by label matchers.

Jump to

Keyboard shortcuts

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