Documentation
¶
Index ¶
- type Client
- func (c *Client) AddDeleteRequest(params DeleteRequestParams) error
- func (c *Client) Flush() error
- func (c *Client) Get(path string) (*http.Response, error)
- func (c *Client) GetDeleteRequests() (DeleteRequests, error)
- func (c *Client) GetRules(ctx context.Context) (*RulesResponse, error)
- func (c *Client) LabelNames(ctx context.Context) ([]string, error)
- func (c *Client) LabelValues(ctx context.Context, labelName string) ([]string, error)
- func (c *Client) Metrics() (string, error)
- func (c *Client) PushLogLine(line string, extraLabels ...map[string]string) error
- func (c *Client) PushLogLineWithTimestamp(line string, timestamp time.Time, extraLabelList ...map[string]string) error
- func (c *Client) RunQuery(ctx context.Context, query string) (*Response, error)
- func (c *Client) RunRangeQuery(ctx context.Context, query string) (*Response, error)
- type DataType
- type DeleteRequest
- type DeleteRequestParams
- type DeleteRequests
- type InjectHeadersOption
- type MatrixValues
- type Option
- type Response
- type Rules
- type RulesData
- type RulesResponse
- type StreamValues
- type VectorValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a HTTP client that adds basic auth and scope
func (*Client) AddDeleteRequest ¶
func (c *Client) AddDeleteRequest(params DeleteRequestParams) error
AddDeleteRequest adds a new delete request
func (*Client) GetDeleteRequests ¶
func (c *Client) GetDeleteRequests() (DeleteRequests, error)
GetDeleteRequest gets a delete request using the request ID
func (*Client) GetRules ¶
func (c *Client) GetRules(ctx context.Context) (*RulesResponse, error)
GetRules returns the loki ruler rules
func (*Client) LabelValues ¶
LabelValues return a LabelValues query
func (*Client) PushLogLine ¶
PushLogLine creates a new logline with the current time as timestamp
func (*Client) PushLogLineWithTimestamp ¶
func (c *Client) PushLogLineWithTimestamp(line string, timestamp time.Time, extraLabelList ...map[string]string) error
PushLogLineWithTimestamp creates a new logline at the given timestamp The timestamp has to be a Unix timestamp (epoch seconds)
type DataType ¶
type DataType struct { ResultType string Stream []StreamValues Matrix []MatrixValues Vector []VectorValues }
DataType holds the result type and a list of StreamValues
func (*DataType) UnmarshalJSON ¶
type DeleteRequest ¶
type DeleteRequestParams ¶
type DeleteRequests ¶
type DeleteRequests []DeleteRequest
type InjectHeadersOption ¶
func (InjectHeadersOption) Type ¶
func (n InjectHeadersOption) Type() string
type MatrixValues ¶
MatrixValues holds a label key value pairs for the metric and a list of a list of values
type RulesResponse ¶
type StreamValues ¶
StreamValues holds a label key value pairs for the Stream and a list of a list of values
type VectorValues ¶
VectorValues holds a label key value pairs for the metric and single timestamp and value
func (*VectorValues) UnmarshalJSON ¶
func (a *VectorValues) UnmarshalJSON(b []byte) error