lokihandler

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package lokihandler provides Loki API implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LokiAPI

type LokiAPI struct {
	// contains filtered or unexported fields
}

LokiAPI implements lokiapi.Handler.

func NewLokiAPI

func NewLokiAPI(q logstorage.Querier, engine *logqlengine.Engine) *LokiAPI

NewLokiAPI creates new LokiAPI.

func (*LokiAPI) IndexStats added in v0.1.0

IndexStats implements indexStats operation.

Get index stats.

GET /loki/api/v1/index/stats

func (*LokiAPI) LabelValues

func (h *LokiAPI) LabelValues(ctx context.Context, params lokiapi.LabelValuesParams) (*lokiapi.Values, error)

LabelValues implements labelValues operation. Get values of label.

GET /loki/api/v1/label/{name}/values

func (*LokiAPI) Labels

func (h *LokiAPI) Labels(ctx context.Context, params lokiapi.LabelsParams) (*lokiapi.Labels, error)

Labels implements labels operation.

Get labels. Used by Grafana to test connection to Loki.

GET /loki/api/v1/labels

func (*LokiAPI) NewError

func (h *LokiAPI) NewError(_ context.Context, err error) *lokiapi.ErrorStatusCode

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (*LokiAPI) Push

Push implements push operation.

Push data.

POST /loki/api/v1/push

func (*LokiAPI) Query

Query implements query operation.

Query.

GET /loki/api/v1/query

func (*LokiAPI) QueryRange

func (h *LokiAPI) QueryRange(ctx context.Context, params lokiapi.QueryRangeParams) (*lokiapi.QueryResponse, error)

QueryRange implements queryRange operation.

Query range.

GET /loki/api/v1/query_range

func (*LokiAPI) Series

func (h *LokiAPI) Series(ctx context.Context, params lokiapi.SeriesParams) (*lokiapi.Maps, error)

Series implements series operation.

Get series.

GET /loki/api/v1/series

Jump to

Keyboard shortcuts

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