prometheus

package
v0.0.0-...-904661e Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: BSD-3-Clause 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 {
	ClusterURI string
	Handle     *qdb.HandleType
	Logger     func(string, ...interface{})
	// contains filtered or unexported fields
}

Client represents a QuasarDB Prometheus client that knows how to read and write Promethus requests and responses

func (*Client) EnsureTable

func (c *Client) EnsureTable(ts prom.TimeSeries) error

EnsureTable ensures the prometheus metric table and required columns exist

func (*Client) GetHandle

func (c *Client) GetHandle() (*qdb.HandleType, error)

GetHandle caches and returns an anonymous user qdb handle

func (*Client) Read

func (c *Client) Read(req *prom.ReadRequest) (*prom.ReadResponse, error)

Read takes a Prometheus read request, fetches the corresponding data from the client's configured QuasarDB server daemon and returns Promethus read response

func (*Client) Write

func (c *Client) Write(tses []prom.TimeSeries) error

Write takes a slice prometheus Timeseries and writes them to QuasarDB

Jump to

Keyboard shortcuts

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