Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: Apache-2.0 Imports: 14 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 {
	TLSConfig config.TLSConfig
	Username  string
	Password  string
	Address   string
}

Client contains fields necessary to query a Loki instance

func (*Client) ListLabelNames

func (c *Client) ListLabelNames(quiet bool) (*loghttp.LabelResponse, error)

ListLabelNames uses the /api/v1/label endpoint to list label names

func (*Client) ListLabelValues

func (c *Client) ListLabelValues(name string, quiet bool) (*loghttp.LabelResponse, error)

ListLabelValues uses the /api/v1/label endpoint to list label values

func (*Client) LiveTailQueryConn

func (c *Client) LiveTailQueryConn(queryStr string, delayFor int, limit int, from int64, quiet bool) (*websocket.Conn, error)

LiveTailQueryConn uses /api/prom/tail to set up a websocket connection and returns it

func (*Client) Query

func (c *Client) Query(queryStr string, limit int, time time.Time, direction logproto.Direction, quiet bool) (*loghttp.QueryResponse, error)

Query uses the /api/v1/query endpoint to execute an instant query excluding interfacer b/c it suggests taking the interface promql.Node instead of logproto.Direction b/c it happens to have a String() method nolint:interfacer

func (*Client) QueryRange

func (c *Client) QueryRange(queryStr string, limit int, from, through time.Time, direction logproto.Direction, step time.Duration, quiet bool) (*loghttp.QueryResponse, error)

QueryRange uses the /api/v1/query_range endpoint to execute a range query excluding interfacer b/c it suggests taking the interface promql.Node instead of logproto.Direction b/c it happens to have a String() method nolint:interfacer

Jump to

Keyboard shortcuts

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