prometheus

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryPrometheus added in v1.4.0

func QueryPrometheus(c client.Client, promQL string) (model.Value, error)

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