prometheus

package
v0.0.0-...-e5c7075 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 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 can query values from prometheus

func NewClient

func NewClient(port string) (client Client)

NewClient returns a new prometheus client. It does not ensure that the client has connectivity.

func (Client) QueryFloat64

func (c Client) QueryFloat64(expression string) (val float64, err error)

QueryFloat64 querys a float64 value for a given expression

type Prometheus

type Prometheus interface {
	QueryFloat64(string) (float64, error)
}

Prometheus is an interface representing a prometheus query client

Jump to

Keyboard shortcuts

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