lokiproxy

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 8 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) DetectedFieldValues

func (s *Server) DetectedFieldValues(ctx context.Context, params lokiapi.DetectedFieldValuesParams) (*lokiapi.DetectedFieldValues, error)

DetectedFieldValues implements detectedFieldValues operation.

Get detected field values.

GET /loki/api/v1/detected_field/{field}/values

func (*Server) DetectedFields

func (s *Server) DetectedFields(ctx context.Context, params lokiapi.DetectedFieldsParams) (*lokiapi.DetectedFields, error)

DetectedFields implements detectedFields operation.

Get detected fields.

GET /loki/api/v1/detected_fields

func (*Server) DetectedLabels

func (s *Server) DetectedLabels(ctx context.Context, params lokiapi.DetectedLabelsParams) (*lokiapi.DetectedLabels, error)

DetectedLabels implements detectedLabels operation.

Get detected labels. Used by Grafana to test Logs Drilldown availability.

GET /loki/api/v1/detected_labels

func (*Server) DrilldownLimits

func (s *Server) DrilldownLimits(ctx context.Context) (*lokiapi.DrilldownLimits, error)

DrilldownLimits implements drilldownLimits operation.

Get drilldown limits. Used by Grafana to get limits from Loki.

GET /loki/api/v1/drilldown-limits

func (*Server) IndexStats

func (s *Server) IndexStats(ctx context.Context, params lokiapi.IndexStatsParams) (*lokiapi.IndexStats, error)

IndexStats implements indexStats operation.

Get index stats.

GET /loki/api/v1/index/stats

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) Patterns

func (s *Server) Patterns(ctx context.Context, params lokiapi.PatternsParams) (*lokiapi.Patterns, error)

Patterns implements patterns operation.

Endpoint can be used to query loki for patterns detected in the logs. This helps understand the structure of the logs Loki has ingested.

GET /loki/api/v1/patterns

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) QueryVolume

func (s *Server) QueryVolume(ctx context.Context, params lokiapi.QueryVolumeParams) (*lokiapi.QueryResponse, error)

QueryVolume implements queryVolume operation.

Query the index for volume information about label and label-value combinations.

GET /loki/api/v1/index/volume

func (*Server) QueryVolumeRange

func (s *Server) QueryVolumeRange(ctx context.Context, params lokiapi.QueryVolumeRangeParams) (*lokiapi.QueryResponse, error)

QueryVolumeRange implements queryVolumeRange operation.

Query the index for volume information about label and label-value combinations.

GET /loki/api/v1/index/volume_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