lokiproxy

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package lokiproxy provides Loki proxy for observability and research.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implement proxy server.

func NewServer

func NewServer(api *lokiapi.Client) *Server

NewServer initializes new proxy Server from openapi client.

func (*Server) LabelValues

func (s *Server) 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 (*Server) Labels

func (s *Server) 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 (*Server) NewError

func (s *Server) NewError(ctx context.Context, err error) *lokiapi.ErrorStatusCode

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (*Server) Push

func (s *Server) Push(ctx context.Context, req lokiapi.PushReq) error

Push implements push operation.

Push data.

GET /loki/api/v1/push

func (*Server) Query

func (s *Server) Query(ctx context.Context, params lokiapi.QueryParams) (*lokiapi.QueryResponse, error)

Query implements query operation.

Query.

GET /loki/api/v1/query

func (*Server) QueryRange

func (s *Server) QueryRange(ctx context.Context, params lokiapi.QueryRangeParams) (*lokiapi.QueryResponse, error)

QueryRange implements queryRange operation.

Query range.

GET /loki/api/v1/query_range

func (*Server) Series

func (s *Server) 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