prometheus

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 9 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 {
	prom.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(kubeClient client.Client, nn types.NamespacedName) (*Client, error)

NewClient returns a prometheus client based on the namespaced name of prometheus-server.

func (*Client) QueryAvg

func (c *Client) QueryAvg(ctx context.Context, promQL string) (float64, error)

func (*Client) QuerySum

func (c *Client) QuerySum(ctx context.Context, promQL string) (float64, error)

func (*Client) RawQuery

func (c *Client) RawQuery(ctx context.Context, promQL string) (model.Value, error)

Jump to

Keyboard shortcuts

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