queryrange

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 89 Imported by: 0

Documentation

Overview

Package contains methods to marshal logqmodel types to queryrange Protobuf types. Its cousing is util/marshal which converts them to JSON.

Index

Constants

View Source
const (
	JSONType     = `application/json; charset=utf-8`
	ProtobufType = `application/vnd.google.protobuf`
)
View Source
const (
	InstantQueryOp   = "instant_query"
	QueryRangeOp     = "query_range"
	SeriesOp         = "series"
	LabelNamesOp     = "labels"
	IndexStatsOp     = "index_stats"
	VolumeOp         = "volume"
	VolumeRangeOp    = "volume_range"
	IndexShardsOp    = "index_shards"
	DetectedFieldsOp = "detected_fields"
	PatternsQueryOp  = "patterns"
	DetectedLabelsOp = "detected_labels"
)
View Source
const (
	DefaultDownstreamConcurrency = 128
)

Variables

View Source
var (
	ErrInvalidLengthQueryrange = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQueryrange   = fmt.Errorf("proto: integer overflow")
)
View Source
var DefaultCodec = &Codec{}
View Source
var (
	ErrMaxQueryParalellism = fmt.Errorf("querying is disabled, please contact your Loki operator")
)
View Source
var (
	StatsHTTPMiddleware middleware.Interface = statsHTTPMiddleware(defaultMetricRecorder)
)

Functions

func MinWeightedParallelism

func MinWeightedParallelism(ctx context.Context, tenantIDs []string, configs []config.PeriodConfig, l Limits, start, end model.Time) int

func NewIndexStatsCacheMiddleware

func NewIndexStatsCacheMiddleware(
	log log.Logger,
	limits Limits,
	merger queryrangebase.Merger,
	c cache.Cache,
	cacheGenNumberLoader queryrangebase.CacheGenNumberLoader,
	iqo util.IngesterQueryOptions,
	shouldCache queryrangebase.ShouldCacheFn,
	parallelismForReq queryrangebase.ParallelismForReqFn,
	retentionEnabled bool,
	transformer UserIDTransformer,
	metrics *queryrangebase.ResultsCacheMetrics,
) (queryrangebase.Middleware, error)

func NewIndexStatsTripperware

func NewIndexStatsTripperware(cfg Config, log log.Logger, limits Limits, schema config.SchemaConfig, merger base.Merger, iqo util.IngesterQueryOptions, c cache.Cache, cacheGenNumLoader base.CacheGenNumberLoader, retentionEnabled bool, metrics *Metrics, metricsNamespace string) (base.Middleware, error)

func NewInstantMetricCacheMiddleware

func NewInstantMetricCacheMiddleware(
	log log.Logger,
	limits Limits,
	merger queryrangebase.Merger,
	c cache.Cache,
	cacheGenNumberLoader queryrangebase.CacheGenNumberLoader,
	shouldCache queryrangebase.ShouldCacheFn,
	parallelismForReq queryrangebase.ParallelismForReqFn,
	retentionEnabled bool,
	transformer UserIDTransformer,
	metrics *queryrangebase.ResultsCacheMetrics,
) (queryrangebase.Middleware, error)

func NewInstantMetricTripperware

func NewInstantMetricTripperware(
	cfg Config,
	engineOpts logql.EngineOpts,
	log log.Logger,
	limits Limits,
	schema config.SchemaConfig,
	metrics *Metrics,
	merger base.Merger,
	c cache.Cache,
	cacheGenNumLoader base.CacheGenNumberLoader,
	retentionEnabled bool,
	indexStatsTripperware base.Middleware,
	metricsNamespace string,
) (base.Middleware, error)

NewInstantMetricTripperware creates a new frontend tripperware responsible for handling metric queries

func NewLabelsCacheMiddleware

func NewLabelsCacheMiddleware(
	logger log.Logger,
	limits Limits,
	merger queryrangebase.Merger,
	c cache.Cache,
	cacheGenNumberLoader queryrangebase.CacheGenNumberLoader,
	shouldCache queryrangebase.ShouldCacheFn,
	parallelismForReq queryrangebase.ParallelismForReqFn,
	retentionEnabled bool,
	transformer UserIDTransformer,
	metrics *queryrangebase.ResultsCacheMetrics,
) (queryrangebase.Middleware, error)

func NewLabelsTripperware

func NewLabelsTripperware(
	cfg Config,
	log log.Logger,
	limits Limits,
	merger base.Merger,
	iqo util.IngesterQueryOptions,
	c cache.Cache,
	cacheGenNumLoader base.CacheGenNumberLoader,
	retentionEnabled bool,
	metrics *Metrics,
	schema config.SchemaConfig,
	metricsNamespace string,
) (base.Middleware, error)

NewLabelsTripperware creates a new frontend tripperware responsible for handling labels requests.

func NewLimitedRoundTripper

func NewLimitedRoundTripper(next queryrangebase.Handler, limits Limits, configs []config.PeriodConfig, middlewares ...queryrangebase.Middleware) queryrangebase.Handler

NewLimitedRoundTripper creates a new roundtripper that enforces MaxQueryParallelism to the `next` roundtripper across `middlewares`.

func NewLimitedTripperware

func NewLimitedTripperware(_ Config, engineOpts logql.EngineOpts, log log.Logger, limits Limits, schema config.SchemaConfig, metrics *Metrics, indexStatsTripperware base.Middleware, merger base.Merger, iqo util.IngesterQueryOptions) (base.Middleware, error)

NewLimitedTripperware creates a new frontend tripperware responsible for handling log requests which are label matcher only, no filter expression.

func NewLimitsMiddleware

func NewLimitsMiddleware(l Limits) queryrangebase.Middleware

NewLimitsMiddleware creates a new Middleware that enforces query limits.

func NewLogFilterTripperware

func NewLogFilterTripperware(cfg Config, engineOpts logql.EngineOpts, log log.Logger, limits Limits, schema config.SchemaConfig, merger base.Merger, iqo util.IngesterQueryOptions, c cache.Cache, metrics *Metrics, indexStatsTripperware base.Middleware, metricsNamespace string) (base.Middleware, error)

NewLogFilterTripperware creates a new frontend tripperware responsible for handling log requests.

func NewLogResultCache

func NewLogResultCache(logger log.Logger, limits Limits, cache cache.Cache, shouldCache queryrangebase.ShouldCacheFn,
	transformer UserIDTransformer, metrics *LogResultCacheMetrics) queryrangebase.Middleware

NewLogResultCache creates a new log result cache middleware. Currently it only caches empty filter queries, this is because those are usually easily and freely cacheable. Log hits are difficult to handle because of the limit query parameter and the size of the response. In the future it could be extended to cache non-empty query results. see https://docs.google.com/document/d/1_mACOpxdWZ5K0cIedaja5gzMbv-m0lUVazqZd2O4mEU/edit

func NewMetricTripperware

func NewMetricTripperware(cfg Config, engineOpts logql.EngineOpts, log log.Logger, limits Limits, schema config.SchemaConfig, merger base.Merger, iqo util.IngesterQueryOptions, c cache.Cache, cacheGenNumLoader base.CacheGenNumberLoader, retentionEnabled bool, extractor base.Extractor, metrics *Metrics, indexStatsTripperware base.Middleware, metricsNamespace string) (base.Middleware, error)

NewMetricTripperware creates a new frontend tripperware responsible for handling metric queries

func NewQuerierSizeLimiterMiddleware

func NewQuerierSizeLimiterMiddleware(
	cfg []config.PeriodConfig,
	engineOpts logql.EngineOpts,
	logger log.Logger,
	limits Limits,
	statsHandler ...queryrangebase.Handler,
) queryrangebase.Middleware

NewQuerierSizeLimiterMiddleware creates a new Middleware that enforces query size limits after sharding and splitting. The errorTemplate should format two strings: the bytes that would be read and the bytes limit.

func NewQueryShardMiddleware

func NewQueryShardMiddleware(
	logger log.Logger,
	confs ShardingConfigs,
	engineOpts logql.EngineOpts,
	middlewareMetrics *queryrangebase.InstrumentMiddlewareMetrics,
	shardingMetrics *logql.MapperMetrics,
	limits Limits,
	maxShards int,
	statsHandler queryrangebase.Handler,
	shardAggregation []string,
) queryrangebase.Middleware

NewQueryShardMiddleware creates a middleware which downstreams queries after AST mapping and query encoding.

func NewQuerySizeLimiterMiddleware

func NewQuerySizeLimiterMiddleware(
	cfg []config.PeriodConfig,
	engineOpts logql.EngineOpts,
	logger log.Logger,
	limits Limits,
	statsHandler ...queryrangebase.Handler,
) queryrangebase.Middleware

NewQuerySizeLimiterMiddleware creates a new Middleware that enforces query size limits. The errorTemplate should format two strings: the bytes that would be read and the bytes limit.

func NewSerializeHTTPHandler

func NewSerializeHTTPHandler(next queryrangebase.Handler, codec queryrangebase.Codec) http.Handler

func NewSerializeRoundTripper

func NewSerializeRoundTripper(next queryrangebase.Handler, codec queryrangebase.Codec) http.RoundTripper

func NewSeriesCacheMiddleware

func NewSeriesCacheMiddleware(
	logger log.Logger,
	limits Limits,
	merger queryrangebase.Merger,
	c cache.Cache,
	cacheGenNumberLoader queryrangebase.CacheGenNumberLoader,
	shouldCache queryrangebase.ShouldCacheFn,
	parallelismForReq queryrangebase.ParallelismForReqFn,
	retentionEnabled bool,
	transformer UserIDTransformer,
	metrics *queryrangebase.ResultsCacheMetrics,
) (queryrangebase.Middleware, error)

func NewSeriesQueryShardMiddleware

func NewSeriesQueryShardMiddleware(
	logger log.Logger,
	confs ShardingConfigs,
	middlewareMetrics *queryrangebase.InstrumentMiddlewareMetrics,
	shardingMetrics *logql.MapperMetrics,
	limits Limits,
	merger queryrangebase.Merger,
) queryrangebase.Middleware

NewSeriesQueryShardMiddleware creates a middleware which shards series queries.

func NewSeriesTripperware

func NewSeriesTripperware(
	cfg Config,
	log log.Logger,
	limits Limits,
	metrics *Metrics,
	schema config.SchemaConfig,
	merger base.Merger,
	iqo util.IngesterQueryOptions,
	c cache.Cache,
	cacheGenNumLoader base.CacheGenNumberLoader,
	retentionEnabled bool,
	metricsNamespace string,
) (base.Middleware, error)

NewSeriesTripperware creates a new frontend tripperware responsible for handling series requests

func NewSplitByRangeMiddleware

func NewSplitByRangeMiddleware(logger log.Logger, engineOpts logql.EngineOpts, limits Limits, splitAlign bool, metrics *logql.MapperMetrics) queryrangebase.Middleware

NewSplitByRangeMiddleware creates a new Middleware that splits log requests by the range interval.

func NewVolumeCacheMiddleware

func NewVolumeCacheMiddleware(
	log log.Logger,
	limits Limits,
	merger queryrangebase.Merger,
	c cache.Cache,
	cacheGenNumberLoader queryrangebase.CacheGenNumberLoader,
	iqo util.IngesterQueryOptions,
	shouldCache queryrangebase.ShouldCacheFn,
	parallelismForReq queryrangebase.ParallelismForReqFn,
	retentionEnabled bool,
	transformer UserIDTransformer,
	metrics *queryrangebase.ResultsCacheMetrics,
) (queryrangebase.Middleware, error)

func NewVolumeMiddleware

func NewVolumeMiddleware() queryrangebase.Middleware

func NewVolumeTripperware

func NewVolumeTripperware(cfg Config, log log.Logger, limits Limits, schema config.SchemaConfig, merger base.Merger, iqo util.IngesterQueryOptions, c cache.Cache, cacheGenNumLoader base.CacheGenNumberLoader, retentionEnabled bool, metrics *Metrics, metricsNamespace string) (base.Middleware, error)

func ParamsFromRequest

func ParamsFromRequest(req queryrangebase.Request) (logql.Params, error)

func ParamsToLokiRequest

func ParamsToLokiRequest(params logql.Params) queryrangebase.Request

func QueryMetricsMiddleware

func QueryMetricsMiddleware(metrics *QueryMetrics) queryrangebase.Middleware

QueryMetricsMiddleware can be inserted into the middleware chain to expose timing information.

func QueryResponseUnwrap

func QueryResponseUnwrap(res *QueryResponse) (queryrangebase.Response, error)

func ResponseToResult

func ResponseToResult(resp queryrangebase.Response) (logqlmodel.Result, error)

func ResultToResponse

func ResultToResponse(result logqlmodel.Result, params logql.Params) (queryrangebase.Response, error)

ResultToResponse is the reverse of ResponseToResult below.

func SplitByIntervalMiddleware

func SplitByIntervalMiddleware(configs []config.PeriodConfig, limits Limits, merger queryrangebase.Merger, splitter splitter, metrics *SplitByMetrics) queryrangebase.Middleware

SplitByIntervalMiddleware creates a new Middleware that splits log requests by a given interval.

func SplitIntervalForTimeRange

func SplitIntervalForTimeRange(iqo util.IngesterQueryOptions, limits Limits, defaultSplitFn func(string) time.Duration, tenantIDs []string, ref, upperBound time.Time) time.Duration

SplitIntervalForTimeRange returns the correct split interval to use. It accounts for the given upperBound value being within the ingester query window, in which case it returns the ingester query split (unless it's not set, then the default split interval will be used).

func StatsCollectorMiddleware

func StatsCollectorMiddleware() queryrangebase.Middleware

StatsCollectorMiddleware compute the stats summary based on the actual duration of the request and inject it in the request context.

func WeightedParallelism

func WeightedParallelism(
	ctx context.Context,
	configs []config.PeriodConfig,
	user string,
	l Limits,
	start, end model.Time,
) int

WeightedParallelism will calculate the request parallelism to use based on the two fields: 1) `max_query_parallelism`: 2) `tsdb_max_query_parallelism`: For instance, if the max_query_parallelism=10, tsdb_max_query_parallelism=100, and the request is equally split between tsdb and non-tsdb period configs, the resulting parallelism will be 0.5 * 10 + 0.5 * 100 = 60

func WriteQueryResponseProtobuf

func WriteQueryResponseProtobuf(params logql.Params, v logqlmodel.Result, w io.Writer) error

WriteQueryResponseProtobuf marshals the promql.Value to queryrange QueryResonse and then writes it to the provided io.Writer.

func WriteSeriesResponseViewJSON

func WriteSeriesResponseViewJSON(v *MergedSeriesResponseView, w io.Writer) error

WriteSeriesResponseViewJSON writes a JSON response to the supplied write that is equivalent to marshal.WriteSeriesResponseJSON.

Types

type Buffer

type Buffer interface {
	Bytes() []byte
}

type Codec

type Codec struct{}

func (Codec) DecodeHTTPGrpcRequest

func (Codec) DecodeHTTPGrpcRequest(ctx context.Context, r *httpgrpc.HTTPRequest) (queryrangebase.Request, context.Context, error)

DecodeHTTPGrpcRequest decodes an httpgrp.HTTPRequest to queryrangebase.Request.

func (Codec) DecodeHTTPGrpcResponse

func (Codec) DecodeHTTPGrpcResponse(r *httpgrpc.HTTPResponse, req queryrangebase.Request) (queryrangebase.Response, error)

DecodeHTTPGrpcResponse decodes an httpgrp.HTTPResponse to queryrangebase.Response.

func (Codec) DecodeRequest

func (Codec) DecodeRequest(_ context.Context, r *http.Request, _ []string) (queryrangebase.Request, error)

func (Codec) EncodeHTTPGrpcResponse

func (Codec) EncodeHTTPGrpcResponse(_ context.Context, req *httpgrpc.HTTPRequest, res queryrangebase.Response) (*httpgrpc.HTTPResponse, error)

func (Codec) EncodeRequest

func (c Codec) EncodeRequest(ctx context.Context, r queryrangebase.Request) (*http.Request, error)

func (Codec) EncodeResponse

func (Codec) EncodeResponse(ctx context.Context, req *http.Request, res queryrangebase.Response) (*http.Response, error)

func (Codec) MergeResponse

func (Codec) MergeResponse(responses ...queryrangebase.Response) (queryrangebase.Response, error)

NOTE: When we would start caching response from non-metric queries we would have to consider cache gen headers as well in MergeResponse implementation for Loki codecs same as it is done in Cortex at https://github.com/cortexproject/cortex/blob/21bad57b346c730d684d6d0205efef133422ab28/pkg/querier/queryrange/query_range.go#L170

func (Codec) Path

func (c Codec) Path(r queryrangebase.Request) string

nolint:goconst

func (Codec) QueryRequestUnwrap

func (Codec) QueryRequestUnwrap(ctx context.Context, req *QueryRequest) (queryrangebase.Request, context.Context, error)

func (Codec) QueryRequestWrap

func (Codec) QueryRequestWrap(ctx context.Context, r queryrangebase.Request) (*QueryRequest, error)

type Config

type Config struct {
	base.Config                  `yaml:",inline"`
	Transformer                  UserIDTransformer        `yaml:"-"`
	CacheIndexStatsResults       bool                     `yaml:"cache_index_stats_results"`
	StatsCacheConfig             IndexStatsCacheConfig    `` /* 166-byte string literal not displayed */
	CacheVolumeResults           bool                     `yaml:"cache_volume_results"`
	VolumeCacheConfig            VolumeCacheConfig        `` /* 156-byte string literal not displayed */
	CacheInstantMetricResults    bool                     `yaml:"cache_instant_metric_results"`
	InstantMetricCacheConfig     InstantMetricCacheConfig `` /* 172-byte string literal not displayed */
	InstantMetricQuerySplitAlign bool                     `` /* 197-byte string literal not displayed */
	CacheSeriesResults           bool                     `yaml:"cache_series_results"`
	SeriesCacheConfig            SeriesCacheConfig        `` /* 163-byte string literal not displayed */
	CacheLabelResults            bool                     `yaml:"cache_label_results"`
	LabelsCacheConfig            LabelsCacheConfig        `` /* 160-byte string literal not displayed */
}

Config is the configuration for the queryrange tripperware

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to configure this flag set.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates the config.

type DetectedFieldsRequest

type DetectedFieldsRequest struct {
	logproto.DetectedFieldsRequest
	// contains filtered or unexported fields
}

In some other world LabelRequest could implement queryrangebase.Request.

func NewDetectedFieldsRequest

func NewDetectedFieldsRequest(start, end time.Time, query, path string) *DetectedFieldsRequest

func (*DetectedFieldsRequest) AsProto

func (*DetectedFieldsRequest) GetCachingOptions

func (*DetectedFieldsRequest) GetCachingOptions() (res queryrangebase.CachingOptions)

func (*DetectedFieldsRequest) GetEnd

func (r *DetectedFieldsRequest) GetEnd() time.Time

func (*DetectedFieldsRequest) GetEndTs

func (r *DetectedFieldsRequest) GetEndTs() time.Time

func (*DetectedFieldsRequest) GetStart

func (r *DetectedFieldsRequest) GetStart() time.Time

func (*DetectedFieldsRequest) GetStartTs

func (r *DetectedFieldsRequest) GetStartTs() time.Time

func (*DetectedFieldsRequest) GetStep

func (r *DetectedFieldsRequest) GetStep() int64

func (*DetectedFieldsRequest) LogToSpan

func (r *DetectedFieldsRequest) LogToSpan(sp opentracing.Span)

func (*DetectedFieldsRequest) Path

func (r *DetectedFieldsRequest) Path() string

func (*DetectedFieldsRequest) WithQuery

func (r *DetectedFieldsRequest) WithQuery(query string) queryrangebase.Request

func (*DetectedFieldsRequest) WithStartEnd

func (r *DetectedFieldsRequest) WithStartEnd(s, e time.Time) queryrangebase.Request

func (*DetectedFieldsRequest) WithStartEndForCache

func (r *DetectedFieldsRequest) WithStartEndForCache(s time.Time, e time.Time) resultscache.Request

WithStartEndForCache implements resultscache.Request.

type DetectedFieldsResponse

type DetectedFieldsResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.DetectedFieldsResponse                                         `` /* 143-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
}

func (*DetectedFieldsResponse) Descriptor

func (*DetectedFieldsResponse) Descriptor() ([]byte, []int)

func (*DetectedFieldsResponse) Equal

func (this *DetectedFieldsResponse) Equal(that interface{}) bool

func (*DetectedFieldsResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*DetectedFieldsResponse) GoString

func (this *DetectedFieldsResponse) GoString() string

func (*DetectedFieldsResponse) Marshal

func (m *DetectedFieldsResponse) Marshal() (dAtA []byte, err error)

func (*DetectedFieldsResponse) MarshalTo

func (m *DetectedFieldsResponse) MarshalTo(dAtA []byte) (int, error)

func (*DetectedFieldsResponse) MarshalToSizedBuffer

func (m *DetectedFieldsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DetectedFieldsResponse) ProtoMessage

func (*DetectedFieldsResponse) ProtoMessage()

func (*DetectedFieldsResponse) Reset

func (m *DetectedFieldsResponse) Reset()

func (*DetectedFieldsResponse) SetHeader

func (m *DetectedFieldsResponse) SetHeader(name, value string)

func (*DetectedFieldsResponse) Size

func (m *DetectedFieldsResponse) Size() (n int)

func (*DetectedFieldsResponse) String

func (this *DetectedFieldsResponse) String() string

func (*DetectedFieldsResponse) Unmarshal

func (m *DetectedFieldsResponse) Unmarshal(dAtA []byte) error

func (*DetectedFieldsResponse) WithHeaders

func (*DetectedFieldsResponse) XXX_DiscardUnknown

func (m *DetectedFieldsResponse) XXX_DiscardUnknown()

func (*DetectedFieldsResponse) XXX_Marshal

func (m *DetectedFieldsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DetectedFieldsResponse) XXX_Merge

func (m *DetectedFieldsResponse) XXX_Merge(src proto.Message)

func (*DetectedFieldsResponse) XXX_Size

func (m *DetectedFieldsResponse) XXX_Size() int

func (*DetectedFieldsResponse) XXX_Unmarshal

func (m *DetectedFieldsResponse) XXX_Unmarshal(b []byte) error

type DetectedLabelsRequest

type DetectedLabelsRequest struct {
	logproto.DetectedLabelsRequest
	// contains filtered or unexported fields
}

func NewDetectedLabelsRequest

func NewDetectedLabelsRequest(start, end time.Time, query, path string) *DetectedLabelsRequest

NewDetectedLabelsRequest creates a new request for detected labels

func (*DetectedLabelsRequest) AsProto

func (*DetectedLabelsRequest) GetCachingOptions

func (*DetectedLabelsRequest) GetCachingOptions() (res queryrangebase.CachingOptions)

func (*DetectedLabelsRequest) GetEnd

func (r *DetectedLabelsRequest) GetEnd() time.Time

func (*DetectedLabelsRequest) GetEndTs

func (r *DetectedLabelsRequest) GetEndTs() time.Time

func (*DetectedLabelsRequest) GetStart

func (r *DetectedLabelsRequest) GetStart() time.Time

func (*DetectedLabelsRequest) GetStartTs

func (r *DetectedLabelsRequest) GetStartTs() time.Time

func (*DetectedLabelsRequest) GetStep

func (r *DetectedLabelsRequest) GetStep() int64

func (*DetectedLabelsRequest) LogToSpan

func (r *DetectedLabelsRequest) LogToSpan(sp opentracing.Span)

func (*DetectedLabelsRequest) Path

func (r *DetectedLabelsRequest) Path() string

func (*DetectedLabelsRequest) WithQuery

func (r *DetectedLabelsRequest) WithQuery(query string) queryrangebase.Request

func (*DetectedLabelsRequest) WithStartEnd

func (r *DetectedLabelsRequest) WithStartEnd(s, e time.Time) queryrangebase.Request

func (*DetectedLabelsRequest) WithStartEndForCache

func (r *DetectedLabelsRequest) WithStartEndForCache(s time.Time, e time.Time) resultscache.Request

WithStartEndForCache implements resultscache.Request.

type DetectedLabelsResponse

type DetectedLabelsResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.DetectedLabelsResponse                                         `` /* 143-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
}

func (*DetectedLabelsResponse) Descriptor

func (*DetectedLabelsResponse) Descriptor() ([]byte, []int)

func (*DetectedLabelsResponse) Equal

func (this *DetectedLabelsResponse) Equal(that interface{}) bool

func (*DetectedLabelsResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*DetectedLabelsResponse) GoString

func (this *DetectedLabelsResponse) GoString() string

func (*DetectedLabelsResponse) Marshal

func (m *DetectedLabelsResponse) Marshal() (dAtA []byte, err error)

func (*DetectedLabelsResponse) MarshalTo

func (m *DetectedLabelsResponse) MarshalTo(dAtA []byte) (int, error)

func (*DetectedLabelsResponse) MarshalToSizedBuffer

func (m *DetectedLabelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DetectedLabelsResponse) ProtoMessage

func (*DetectedLabelsResponse) ProtoMessage()

func (*DetectedLabelsResponse) Reset

func (m *DetectedLabelsResponse) Reset()

func (*DetectedLabelsResponse) SetHeader

func (m *DetectedLabelsResponse) SetHeader(name, value string)

func (*DetectedLabelsResponse) Size

func (m *DetectedLabelsResponse) Size() (n int)

func (*DetectedLabelsResponse) String

func (this *DetectedLabelsResponse) String() string

func (*DetectedLabelsResponse) Unmarshal

func (m *DetectedLabelsResponse) Unmarshal(dAtA []byte) error

func (*DetectedLabelsResponse) WithHeaders

func (*DetectedLabelsResponse) XXX_DiscardUnknown

func (m *DetectedLabelsResponse) XXX_DiscardUnknown()

func (*DetectedLabelsResponse) XXX_Marshal

func (m *DetectedLabelsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DetectedLabelsResponse) XXX_Merge

func (m *DetectedLabelsResponse) XXX_Merge(src proto.Message)

func (*DetectedLabelsResponse) XXX_Size

func (m *DetectedLabelsResponse) XXX_Size() int

func (*DetectedLabelsResponse) XXX_Unmarshal

func (m *DetectedLabelsResponse) XXX_Unmarshal(b []byte) error

type DownstreamHandler

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

func (DownstreamHandler) Downstreamer

func (h DownstreamHandler) Downstreamer(ctx context.Context) logql.Downstreamer

Note: After the introduction of the LimitedRoundTripper, bounding concurrency in the downstreamer is mostly redundant The reason we don't remove it is to prevent malicious queries from creating an unreasonably large number of goroutines, such as the case of a query like `a / a / a / a / a ..etc`, which could try to shard each leg, quickly dispatching an unreasonable number of goroutines. In the future, it's probably better to replace this with a channel based API so we don't have to do all this ugly edge case handling/accounting

type IndexStatsCacheConfig

type IndexStatsCacheConfig struct {
	queryrangebase.ResultsCacheConfig `yaml:",inline"`
}

func (*IndexStatsCacheConfig) RegisterFlags

func (cfg *IndexStatsCacheConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

func (*IndexStatsCacheConfig) Validate

func (cfg *IndexStatsCacheConfig) Validate() error

type IndexStatsExtractor

type IndexStatsExtractor struct{}

func (IndexStatsExtractor) Extract

func (p IndexStatsExtractor) Extract(start, end int64, res resultscache.Response, resStart, resEnd int64) resultscache.Response

Extract favors the ability to cache over exactness of results. It assumes a constant distribution of log volumes over a range and will extract subsets proportionally.

func (IndexStatsExtractor) ResponseWithoutHeaders

func (p IndexStatsExtractor) ResponseWithoutHeaders(resp queryrangebase.Response) queryrangebase.Response

type IndexStatsResponse

type IndexStatsResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.IndexStatsResponse                                             `` /* 139-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
}

func (*IndexStatsResponse) Descriptor

func (*IndexStatsResponse) Descriptor() ([]byte, []int)

func (*IndexStatsResponse) Equal

func (this *IndexStatsResponse) Equal(that interface{}) bool

func (*IndexStatsResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*IndexStatsResponse) GoString

func (this *IndexStatsResponse) GoString() string

func (*IndexStatsResponse) Marshal

func (m *IndexStatsResponse) Marshal() (dAtA []byte, err error)

func (*IndexStatsResponse) MarshalTo

func (m *IndexStatsResponse) MarshalTo(dAtA []byte) (int, error)

func (*IndexStatsResponse) MarshalToSizedBuffer

func (m *IndexStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IndexStatsResponse) ProtoMessage

func (*IndexStatsResponse) ProtoMessage()

func (*IndexStatsResponse) Reset

func (m *IndexStatsResponse) Reset()

func (*IndexStatsResponse) SetHeader

func (m *IndexStatsResponse) SetHeader(name, value string)

func (*IndexStatsResponse) Size

func (m *IndexStatsResponse) Size() (n int)

func (*IndexStatsResponse) String

func (this *IndexStatsResponse) String() string

func (*IndexStatsResponse) Unmarshal

func (m *IndexStatsResponse) Unmarshal(dAtA []byte) error

func (*IndexStatsResponse) WithHeaders

func (*IndexStatsResponse) XXX_DiscardUnknown

func (m *IndexStatsResponse) XXX_DiscardUnknown()

func (*IndexStatsResponse) XXX_Marshal

func (m *IndexStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IndexStatsResponse) XXX_Merge

func (m *IndexStatsResponse) XXX_Merge(src proto.Message)

func (*IndexStatsResponse) XXX_Size

func (m *IndexStatsResponse) XXX_Size() int

func (*IndexStatsResponse) XXX_Unmarshal

func (m *IndexStatsResponse) XXX_Unmarshal(b []byte) error

type IndexStatsSplitter

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

func (IndexStatsSplitter) GenerateCacheKey

func (i IndexStatsSplitter) GenerateCacheKey(ctx context.Context, userID string, r resultscache.Request) string

GenerateCacheKey generates a cache key based on the userID, Request and interval.

type InstantMetricCacheConfig

type InstantMetricCacheConfig struct {
	queryrangebase.ResultsCacheConfig `yaml:",inline"`
}

func (*InstantMetricCacheConfig) RegisterFlags

func (cfg *InstantMetricCacheConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

func (*InstantMetricCacheConfig) Validate

func (cfg *InstantMetricCacheConfig) Validate() error

type InstantMetricSplitter

type InstantMetricSplitter struct {
	Limits
	// contains filtered or unexported fields
}

func (InstantMetricSplitter) GenerateCacheKey

func (i InstantMetricSplitter) GenerateCacheKey(ctx context.Context, userID string, r resultscache.Request) string

GenerateCacheKey generates a cache key based on the userID, Request and interval.

type Instrument

type Instrument struct {
	*server.Metrics
}

func (Instrument) Wrap

Wrap implements the queryrangebase.Middleware

type LabelRequest

type LabelRequest struct {
	logproto.LabelRequest
	// contains filtered or unexported fields
}

In some other world LabelRequest could implement queryrangebase.Request.

func NewLabelRequest

func NewLabelRequest(start, end time.Time, query, name, path string) *LabelRequest

func (*LabelRequest) AsProto

func (r *LabelRequest) AsProto() *logproto.LabelRequest

func (*LabelRequest) GetCachingOptions

func (*LabelRequest) GetCachingOptions() (res queryrangebase.CachingOptions)

func (*LabelRequest) GetEnd

func (r *LabelRequest) GetEnd() time.Time

func (*LabelRequest) GetEndTs

func (r *LabelRequest) GetEndTs() time.Time

func (*LabelRequest) GetStart

func (r *LabelRequest) GetStart() time.Time

func (*LabelRequest) GetStartTs

func (r *LabelRequest) GetStartTs() time.Time

func (*LabelRequest) GetStep

func (r *LabelRequest) GetStep() int64

func (*LabelRequest) LogToSpan

func (r *LabelRequest) LogToSpan(sp opentracing.Span)

func (*LabelRequest) Path

func (r *LabelRequest) Path() string

func (*LabelRequest) WithQuery

func (r *LabelRequest) WithQuery(query string) queryrangebase.Request

func (*LabelRequest) WithStartEnd

func (r *LabelRequest) WithStartEnd(s, e time.Time) queryrangebase.Request

func (*LabelRequest) WithStartEndForCache

func (r *LabelRequest) WithStartEndForCache(s time.Time, e time.Time) resultscache.Request

WithStartEndForCache implements resultscache.Request.

type LabelsCacheConfig

type LabelsCacheConfig struct {
	queryrangebase.ResultsCacheConfig `yaml:",inline"`
}

func (*LabelsCacheConfig) RegisterFlags

func (cfg *LabelsCacheConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

func (*LabelsCacheConfig) Validate

func (cfg *LabelsCacheConfig) Validate() error

type Limits

func WithMaxParallelism

func WithMaxParallelism(l Limits, maxParallelism int) Limits

func WithSplitByLimits

func WithSplitByLimits(l Limits, splitBy time.Duration) Limits

WithSplitByLimits will construct a Limits with a static split by duration.

type LogResultCacheMetrics

type LogResultCacheMetrics struct {
	CacheHit  prometheus.Counter
	CacheMiss prometheus.Counter
}

LogResultCacheMetrics is the metrics wrapper used in log result cache.

func NewLogResultCacheMetrics

func NewLogResultCacheMetrics(registerer prometheus.Registerer) *LogResultCacheMetrics

NewLogResultCacheMetrics creates metrics to be used in log result cache.

type LokiData

type LokiData struct {
	ResultType string                                    `protobuf:"bytes,1,opt,name=ResultType,proto3" json:"resultType"`
	Result     []github_com_grafana_loki_pkg_push.Stream `protobuf:"bytes,2,rep,name=Result,proto3,customtype=github.com/grafana/loki/pkg/push.Stream" json:"result"`
}

func (*LokiData) Descriptor

func (*LokiData) Descriptor() ([]byte, []int)

func (*LokiData) Equal

func (this *LokiData) Equal(that interface{}) bool

func (*LokiData) GetResultType

func (m *LokiData) GetResultType() string

func (*LokiData) GoString

func (this *LokiData) GoString() string

func (*LokiData) Marshal

func (m *LokiData) Marshal() (dAtA []byte, err error)

func (*LokiData) MarshalTo

func (m *LokiData) MarshalTo(dAtA []byte) (int, error)

func (*LokiData) MarshalToSizedBuffer

func (m *LokiData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiData) ProtoMessage

func (*LokiData) ProtoMessage()

func (*LokiData) Reset

func (m *LokiData) Reset()

func (*LokiData) Size

func (m *LokiData) Size() (n int)

func (*LokiData) String

func (this *LokiData) String() string

func (*LokiData) Unmarshal

func (m *LokiData) Unmarshal(dAtA []byte) error

func (*LokiData) XXX_DiscardUnknown

func (m *LokiData) XXX_DiscardUnknown()

func (*LokiData) XXX_Marshal

func (m *LokiData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiData) XXX_Merge

func (m *LokiData) XXX_Merge(src proto.Message)

func (*LokiData) XXX_Size

func (m *LokiData) XXX_Size() int

func (*LokiData) XXX_Unmarshal

func (m *LokiData) XXX_Unmarshal(b []byte) error

type LokiInstantRequest

type LokiInstantRequest struct {
	Query     string                                                 `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Limit     uint32                                                 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	TimeTs    time.Time                                              `protobuf:"bytes,3,opt,name=timeTs,proto3,stdtime" json:"timeTs"`
	Direction logproto.Direction                                     `protobuf:"varint,4,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"`
	Path      string                                                 `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
	Shards    []string                                               `protobuf:"bytes,6,rep,name=shards,proto3" json:"shards"`
	Plan      *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `` /* 126-byte string literal not displayed */
}

func (*LokiInstantRequest) Descriptor

func (*LokiInstantRequest) Descriptor() ([]byte, []int)

func (*LokiInstantRequest) Equal

func (this *LokiInstantRequest) Equal(that interface{}) bool

func (*LokiInstantRequest) GetCachingOptions

func (*LokiInstantRequest) GetCachingOptions() (res queryrangebase.CachingOptions)

func (*LokiInstantRequest) GetDirection

func (m *LokiInstantRequest) GetDirection() logproto.Direction

func (*LokiInstantRequest) GetEnd

func (r *LokiInstantRequest) GetEnd() time.Time

func (*LokiInstantRequest) GetLimit

func (m *LokiInstantRequest) GetLimit() uint32

func (*LokiInstantRequest) GetPath

func (m *LokiInstantRequest) GetPath() string

func (*LokiInstantRequest) GetQuery

func (m *LokiInstantRequest) GetQuery() string

func (*LokiInstantRequest) GetShards

func (m *LokiInstantRequest) GetShards() []string

func (*LokiInstantRequest) GetStart

func (r *LokiInstantRequest) GetStart() time.Time

func (*LokiInstantRequest) GetStep

func (r *LokiInstantRequest) GetStep() int64

func (*LokiInstantRequest) GetTimeTs

func (m *LokiInstantRequest) GetTimeTs() time.Time

func (*LokiInstantRequest) GoString

func (this *LokiInstantRequest) GoString() string

func (*LokiInstantRequest) LogToSpan

func (r *LokiInstantRequest) LogToSpan(sp opentracing.Span)

func (*LokiInstantRequest) Marshal

func (m *LokiInstantRequest) Marshal() (dAtA []byte, err error)

func (*LokiInstantRequest) MarshalTo

func (m *LokiInstantRequest) MarshalTo(dAtA []byte) (int, error)

func (*LokiInstantRequest) MarshalToSizedBuffer

func (m *LokiInstantRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiInstantRequest) ProtoMessage

func (*LokiInstantRequest) ProtoMessage()

func (*LokiInstantRequest) Reset

func (m *LokiInstantRequest) Reset()

func (*LokiInstantRequest) Size

func (m *LokiInstantRequest) Size() (n int)

func (*LokiInstantRequest) String

func (this *LokiInstantRequest) String() string

func (*LokiInstantRequest) Unmarshal

func (m *LokiInstantRequest) Unmarshal(dAtA []byte) error

func (*LokiInstantRequest) WithQuery

func (r *LokiInstantRequest) WithQuery(query string) queryrangebase.Request

func (*LokiInstantRequest) WithShards

func (r *LokiInstantRequest) WithShards(shards logql.Shards) *LokiInstantRequest

func (*LokiInstantRequest) WithStartEnd

func (r *LokiInstantRequest) WithStartEnd(s time.Time, _ time.Time) queryrangebase.Request

func (*LokiInstantRequest) WithStartEndForCache

func (r *LokiInstantRequest) WithStartEndForCache(s time.Time, e time.Time) resultscache.Request

WithStartEndForCache implements resultscache.Request.

func (*LokiInstantRequest) XXX_DiscardUnknown

func (m *LokiInstantRequest) XXX_DiscardUnknown()

func (*LokiInstantRequest) XXX_Marshal

func (m *LokiInstantRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiInstantRequest) XXX_Merge

func (m *LokiInstantRequest) XXX_Merge(src proto.Message)

func (*LokiInstantRequest) XXX_Size

func (m *LokiInstantRequest) XXX_Size() int

func (*LokiInstantRequest) XXX_Unmarshal

func (m *LokiInstantRequest) XXX_Unmarshal(b []byte) error

type LokiLabelNamesResponse

type LokiLabelNamesResponse struct {
	Status     string                                                                                                  `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"`
	Data       []string                                                                                                `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"`
	Version    uint32                                                                                                  `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	Headers    []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
	Statistics stats.Result                                                                                            `protobuf:"bytes,5,opt,name=statistics,proto3" json:"statistics"`
}

func (*LokiLabelNamesResponse) Descriptor

func (*LokiLabelNamesResponse) Descriptor() ([]byte, []int)

func (*LokiLabelNamesResponse) Equal

func (this *LokiLabelNamesResponse) Equal(that interface{}) bool

func (*LokiLabelNamesResponse) GetData

func (m *LokiLabelNamesResponse) GetData() []string

func (*LokiLabelNamesResponse) GetHeaders

func (*LokiLabelNamesResponse) GetStatistics

func (m *LokiLabelNamesResponse) GetStatistics() stats.Result

func (*LokiLabelNamesResponse) GetStatus

func (m *LokiLabelNamesResponse) GetStatus() string

func (*LokiLabelNamesResponse) GetVersion

func (m *LokiLabelNamesResponse) GetVersion() uint32

func (*LokiLabelNamesResponse) GoString

func (this *LokiLabelNamesResponse) GoString() string

func (*LokiLabelNamesResponse) Marshal

func (m *LokiLabelNamesResponse) Marshal() (dAtA []byte, err error)

func (*LokiLabelNamesResponse) MarshalTo

func (m *LokiLabelNamesResponse) MarshalTo(dAtA []byte) (int, error)

func (*LokiLabelNamesResponse) MarshalToSizedBuffer

func (m *LokiLabelNamesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiLabelNamesResponse) ProtoMessage

func (*LokiLabelNamesResponse) ProtoMessage()

func (*LokiLabelNamesResponse) Reset

func (m *LokiLabelNamesResponse) Reset()

func (*LokiLabelNamesResponse) SetHeader

func (m *LokiLabelNamesResponse) SetHeader(name, value string)

func (*LokiLabelNamesResponse) Size

func (m *LokiLabelNamesResponse) Size() (n int)

func (*LokiLabelNamesResponse) String

func (this *LokiLabelNamesResponse) String() string

func (*LokiLabelNamesResponse) Unmarshal

func (m *LokiLabelNamesResponse) Unmarshal(dAtA []byte) error

func (*LokiLabelNamesResponse) WithHeaders

func (*LokiLabelNamesResponse) XXX_DiscardUnknown

func (m *LokiLabelNamesResponse) XXX_DiscardUnknown()

func (*LokiLabelNamesResponse) XXX_Marshal

func (m *LokiLabelNamesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiLabelNamesResponse) XXX_Merge

func (m *LokiLabelNamesResponse) XXX_Merge(src proto.Message)

func (*LokiLabelNamesResponse) XXX_Size

func (m *LokiLabelNamesResponse) XXX_Size() int

func (*LokiLabelNamesResponse) XXX_Unmarshal

func (m *LokiLabelNamesResponse) XXX_Unmarshal(b []byte) error

type LokiPromResponse

type LokiPromResponse struct {
	Response   *queryrangebase.PrometheusResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	Statistics stats.Result                       `protobuf:"bytes,2,opt,name=statistics,proto3" json:"statistics"`
}

LokiPromResponse wraps a Prometheus response with statistics.

func ToPrometheusResponse

func ToPrometheusResponse(respsCh chan *bucketedVolumeResponse, aggregateBySeries bool) *LokiPromResponse

func (*LokiPromResponse) Descriptor

func (*LokiPromResponse) Descriptor() ([]byte, []int)

func (*LokiPromResponse) Equal

func (this *LokiPromResponse) Equal(that interface{}) bool

func (*LokiPromResponse) GetHeaders

func (*LokiPromResponse) GetResponse

func (*LokiPromResponse) GetStatistics

func (m *LokiPromResponse) GetStatistics() stats.Result

func (*LokiPromResponse) GoString

func (this *LokiPromResponse) GoString() string

func (*LokiPromResponse) Marshal

func (m *LokiPromResponse) Marshal() (dAtA []byte, err error)

func (*LokiPromResponse) MarshalTo

func (m *LokiPromResponse) MarshalTo(dAtA []byte) (int, error)

func (*LokiPromResponse) MarshalToSizedBuffer

func (m *LokiPromResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiPromResponse) ProtoMessage

func (*LokiPromResponse) ProtoMessage()

func (*LokiPromResponse) Reset

func (m *LokiPromResponse) Reset()

func (*LokiPromResponse) SetHeader

func (m *LokiPromResponse) SetHeader(name, value string)

func (*LokiPromResponse) Size

func (m *LokiPromResponse) Size() (n int)

func (*LokiPromResponse) String

func (this *LokiPromResponse) String() string

func (*LokiPromResponse) Unmarshal

func (m *LokiPromResponse) Unmarshal(dAtA []byte) error

func (*LokiPromResponse) WithHeaders

func (*LokiPromResponse) XXX_DiscardUnknown

func (m *LokiPromResponse) XXX_DiscardUnknown()

func (*LokiPromResponse) XXX_Marshal

func (m *LokiPromResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiPromResponse) XXX_Merge

func (m *LokiPromResponse) XXX_Merge(src proto.Message)

func (*LokiPromResponse) XXX_Size

func (m *LokiPromResponse) XXX_Size() int

func (*LokiPromResponse) XXX_Unmarshal

func (m *LokiPromResponse) XXX_Unmarshal(b []byte) error

type LokiRequest

type LokiRequest struct {
	Query     string                                                 `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Limit     uint32                                                 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Step      int64                                                  `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"`
	Interval  int64                                                  `protobuf:"varint,9,opt,name=interval,proto3" json:"interval,omitempty"`
	StartTs   time.Time                                              `protobuf:"bytes,4,opt,name=startTs,proto3,stdtime" json:"startTs"`
	EndTs     time.Time                                              `protobuf:"bytes,5,opt,name=endTs,proto3,stdtime" json:"endTs"`
	Direction logproto.Direction                                     `protobuf:"varint,6,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"`
	Path      string                                                 `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"`
	Shards    []string                                               `protobuf:"bytes,8,rep,name=shards,proto3" json:"shards"`
	Plan      *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `` /* 127-byte string literal not displayed */
}

func (*LokiRequest) Descriptor

func (*LokiRequest) Descriptor() ([]byte, []int)

func (*LokiRequest) Equal

func (this *LokiRequest) Equal(that interface{}) bool

func (*LokiRequest) GetCachingOptions

func (*LokiRequest) GetCachingOptions() (res queryrangebase.CachingOptions)

func (*LokiRequest) GetDirection

func (m *LokiRequest) GetDirection() logproto.Direction

func (*LokiRequest) GetEnd

func (r *LokiRequest) GetEnd() time.Time

func (*LokiRequest) GetEndTs

func (m *LokiRequest) GetEndTs() time.Time

func (*LokiRequest) GetInterval

func (m *LokiRequest) GetInterval() int64

func (*LokiRequest) GetLimit

func (m *LokiRequest) GetLimit() uint32

func (*LokiRequest) GetPath

func (m *LokiRequest) GetPath() string

func (*LokiRequest) GetQuery

func (m *LokiRequest) GetQuery() string

func (*LokiRequest) GetShards

func (m *LokiRequest) GetShards() []string

func (*LokiRequest) GetStart

func (r *LokiRequest) GetStart() time.Time

func (*LokiRequest) GetStartTs

func (m *LokiRequest) GetStartTs() time.Time

func (*LokiRequest) GetStep

func (m *LokiRequest) GetStep() int64

func (*LokiRequest) GoString

func (this *LokiRequest) GoString() string

func (*LokiRequest) LogToSpan

func (r *LokiRequest) LogToSpan(sp opentracing.Span)

func (*LokiRequest) Marshal

func (m *LokiRequest) Marshal() (dAtA []byte, err error)

func (*LokiRequest) MarshalTo

func (m *LokiRequest) MarshalTo(dAtA []byte) (int, error)

func (*LokiRequest) MarshalToSizedBuffer

func (m *LokiRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiRequest) ProtoMessage

func (*LokiRequest) ProtoMessage()

func (*LokiRequest) Reset

func (m *LokiRequest) Reset()

func (*LokiRequest) Size

func (m *LokiRequest) Size() (n int)

func (*LokiRequest) String

func (this *LokiRequest) String() string

func (*LokiRequest) Unmarshal

func (m *LokiRequest) Unmarshal(dAtA []byte) error

func (*LokiRequest) WithQuery

func (r *LokiRequest) WithQuery(query string) queryrangebase.Request

func (*LokiRequest) WithShards

func (r *LokiRequest) WithShards(shards logql.Shards) *LokiRequest

func (*LokiRequest) WithStartEnd

func (r *LokiRequest) WithStartEnd(s time.Time, e time.Time) queryrangebase.Request

func (*LokiRequest) WithStartEndForCache

func (r *LokiRequest) WithStartEndForCache(s time.Time, e time.Time) resultscache.Request

WithStartEndForCache implements resultscache.Request.

func (*LokiRequest) XXX_DiscardUnknown

func (m *LokiRequest) XXX_DiscardUnknown()

func (*LokiRequest) XXX_Marshal

func (m *LokiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiRequest) XXX_Merge

func (m *LokiRequest) XXX_Merge(src proto.Message)

func (*LokiRequest) XXX_Size

func (m *LokiRequest) XXX_Size() int

func (*LokiRequest) XXX_Unmarshal

func (m *LokiRequest) XXX_Unmarshal(b []byte) error

type LokiResponse

type LokiResponse struct {
	Status     string                                                                                                  `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"`
	Data       LokiData                                                                                                `protobuf:"bytes,2,opt,name=Data,proto3" json:"data,omitempty"`
	ErrorType  string                                                                                                  `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"`
	Error      string                                                                                                  `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"`
	Direction  logproto.Direction                                                                                      `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"`
	Limit      uint32                                                                                                  `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"`
	Version    uint32                                                                                                  `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
	Statistics stats.Result                                                                                            `protobuf:"bytes,8,opt,name=statistics,proto3" json:"statistics"`
	Headers    []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
	Warnings   []string                                                                                                `protobuf:"bytes,10,rep,name=warnings,proto3" json:"warnings,omitempty"`
}

func (LokiResponse) Count

func (res LokiResponse) Count() int64

func (*LokiResponse) Descriptor

func (*LokiResponse) Descriptor() ([]byte, []int)

func (*LokiResponse) Equal

func (this *LokiResponse) Equal(that interface{}) bool

func (*LokiResponse) GetData

func (m *LokiResponse) GetData() LokiData

func (*LokiResponse) GetDirection

func (m *LokiResponse) GetDirection() logproto.Direction

func (*LokiResponse) GetError

func (m *LokiResponse) GetError() string

func (*LokiResponse) GetErrorType

func (m *LokiResponse) GetErrorType() string

func (*LokiResponse) GetHeaders

func (*LokiResponse) GetLimit

func (m *LokiResponse) GetLimit() uint32

func (*LokiResponse) GetStatistics

func (m *LokiResponse) GetStatistics() stats.Result

func (*LokiResponse) GetStatus

func (m *LokiResponse) GetStatus() string

func (*LokiResponse) GetVersion

func (m *LokiResponse) GetVersion() uint32

func (*LokiResponse) GetWarnings

func (m *LokiResponse) GetWarnings() []string

func (*LokiResponse) GoString

func (this *LokiResponse) GoString() string

func (*LokiResponse) Marshal

func (m *LokiResponse) Marshal() (dAtA []byte, err error)

func (*LokiResponse) MarshalTo

func (m *LokiResponse) MarshalTo(dAtA []byte) (int, error)

func (*LokiResponse) MarshalToSizedBuffer

func (m *LokiResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiResponse) ProtoMessage

func (*LokiResponse) ProtoMessage()

func (*LokiResponse) Reset

func (m *LokiResponse) Reset()

func (*LokiResponse) SetHeader

func (m *LokiResponse) SetHeader(name, value string)

func (*LokiResponse) Size

func (m *LokiResponse) Size() (n int)

func (*LokiResponse) String

func (this *LokiResponse) String() string

func (*LokiResponse) Unmarshal

func (m *LokiResponse) Unmarshal(dAtA []byte) error

func (*LokiResponse) XXX_DiscardUnknown

func (m *LokiResponse) XXX_DiscardUnknown()

func (*LokiResponse) XXX_Marshal

func (m *LokiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiResponse) XXX_Merge

func (m *LokiResponse) XXX_Merge(src proto.Message)

func (*LokiResponse) XXX_Size

func (m *LokiResponse) XXX_Size() int

func (*LokiResponse) XXX_Unmarshal

func (m *LokiResponse) XXX_Unmarshal(b []byte) error

type LokiSeriesRequest

type LokiSeriesRequest struct {
	Match   []string  `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"`
	StartTs time.Time `protobuf:"bytes,2,opt,name=startTs,proto3,stdtime" json:"startTs"`
	EndTs   time.Time `protobuf:"bytes,3,opt,name=endTs,proto3,stdtime" json:"endTs"`
	Path    string    `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	Shards  []string  `protobuf:"bytes,5,rep,name=shards,proto3" json:"shards"`
}

func (*LokiSeriesRequest) Descriptor

func (*LokiSeriesRequest) Descriptor() ([]byte, []int)

func (*LokiSeriesRequest) Equal

func (this *LokiSeriesRequest) Equal(that interface{}) bool

func (*LokiSeriesRequest) GetCachingOptions

func (*LokiSeriesRequest) GetCachingOptions() (res queryrangebase.CachingOptions)

func (*LokiSeriesRequest) GetEnd

func (r *LokiSeriesRequest) GetEnd() time.Time

func (*LokiSeriesRequest) GetEndTs

func (m *LokiSeriesRequest) GetEndTs() time.Time

func (*LokiSeriesRequest) GetMatch

func (m *LokiSeriesRequest) GetMatch() []string

func (*LokiSeriesRequest) GetPath

func (m *LokiSeriesRequest) GetPath() string

func (*LokiSeriesRequest) GetQuery

func (r *LokiSeriesRequest) GetQuery() string

func (*LokiSeriesRequest) GetShards

func (m *LokiSeriesRequest) GetShards() []string

func (*LokiSeriesRequest) GetStart

func (r *LokiSeriesRequest) GetStart() time.Time

func (*LokiSeriesRequest) GetStartTs

func (m *LokiSeriesRequest) GetStartTs() time.Time

func (*LokiSeriesRequest) GetStep

func (r *LokiSeriesRequest) GetStep() int64

func (*LokiSeriesRequest) GoString

func (this *LokiSeriesRequest) GoString() string

func (*LokiSeriesRequest) LogToSpan

func (r *LokiSeriesRequest) LogToSpan(sp opentracing.Span)

func (*LokiSeriesRequest) Marshal

func (m *LokiSeriesRequest) Marshal() (dAtA []byte, err error)

func (*LokiSeriesRequest) MarshalTo

func (m *LokiSeriesRequest) MarshalTo(dAtA []byte) (int, error)

func (*LokiSeriesRequest) MarshalToSizedBuffer

func (m *LokiSeriesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiSeriesRequest) ProtoMessage

func (*LokiSeriesRequest) ProtoMessage()

func (*LokiSeriesRequest) Reset

func (m *LokiSeriesRequest) Reset()

func (*LokiSeriesRequest) Size

func (m *LokiSeriesRequest) Size() (n int)

func (*LokiSeriesRequest) String

func (this *LokiSeriesRequest) String() string

func (*LokiSeriesRequest) Unmarshal

func (m *LokiSeriesRequest) Unmarshal(dAtA []byte) error

func (*LokiSeriesRequest) WithQuery

func (*LokiSeriesRequest) WithStartEnd

func (r *LokiSeriesRequest) WithStartEnd(s, e time.Time) queryrangebase.Request

func (*LokiSeriesRequest) WithStartEndForCache

func (r *LokiSeriesRequest) WithStartEndForCache(s time.Time, e time.Time) resultscache.Request

WithStartEndForCache implements resultscache.Request.

func (*LokiSeriesRequest) XXX_DiscardUnknown

func (m *LokiSeriesRequest) XXX_DiscardUnknown()

func (*LokiSeriesRequest) XXX_Marshal

func (m *LokiSeriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiSeriesRequest) XXX_Merge

func (m *LokiSeriesRequest) XXX_Merge(src proto.Message)

func (*LokiSeriesRequest) XXX_Size

func (m *LokiSeriesRequest) XXX_Size() int

func (*LokiSeriesRequest) XXX_Unmarshal

func (m *LokiSeriesRequest) XXX_Unmarshal(b []byte) error

type LokiSeriesResponse

type LokiSeriesResponse struct {
	Status     string                                                                                                  `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"`
	Data       []logproto.SeriesIdentifier                                                                             `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"`
	Version    uint32                                                                                                  `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	Headers    []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
	Statistics stats.Result                                                                                            `protobuf:"bytes,5,opt,name=statistics,proto3" json:"statistics"`
}

func (*LokiSeriesResponse) Descriptor

func (*LokiSeriesResponse) Descriptor() ([]byte, []int)

func (*LokiSeriesResponse) Equal

func (this *LokiSeriesResponse) Equal(that interface{}) bool

func (*LokiSeriesResponse) GetData

func (*LokiSeriesResponse) GetHeaders

func (*LokiSeriesResponse) GetStatistics

func (m *LokiSeriesResponse) GetStatistics() stats.Result

func (*LokiSeriesResponse) GetStatus

func (m *LokiSeriesResponse) GetStatus() string

func (*LokiSeriesResponse) GetVersion

func (m *LokiSeriesResponse) GetVersion() uint32

func (*LokiSeriesResponse) GoString

func (this *LokiSeriesResponse) GoString() string

func (*LokiSeriesResponse) Marshal

func (m *LokiSeriesResponse) Marshal() (dAtA []byte, err error)

func (*LokiSeriesResponse) MarshalTo

func (m *LokiSeriesResponse) MarshalTo(dAtA []byte) (int, error)

func (*LokiSeriesResponse) MarshalToSizedBuffer

func (m *LokiSeriesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LokiSeriesResponse) ProtoMessage

func (*LokiSeriesResponse) ProtoMessage()

func (*LokiSeriesResponse) Reset

func (m *LokiSeriesResponse) Reset()

func (*LokiSeriesResponse) SetHeader

func (m *LokiSeriesResponse) SetHeader(name, value string)

func (*LokiSeriesResponse) Size

func (m *LokiSeriesResponse) Size() (n int)

func (*LokiSeriesResponse) String

func (this *LokiSeriesResponse) String() string

func (*LokiSeriesResponse) Unmarshal

func (m *LokiSeriesResponse) Unmarshal(dAtA []byte) error

func (*LokiSeriesResponse) UnmarshalJSON

func (m *LokiSeriesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes from loghttpSeriesResponse JSON format directly into the protobuf LokiSeriesResponse.

func (*LokiSeriesResponse) WithHeaders

func (*LokiSeriesResponse) XXX_DiscardUnknown

func (m *LokiSeriesResponse) XXX_DiscardUnknown()

func (*LokiSeriesResponse) XXX_Marshal

func (m *LokiSeriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LokiSeriesResponse) XXX_Merge

func (m *LokiSeriesResponse) XXX_Merge(src proto.Message)

func (*LokiSeriesResponse) XXX_Size

func (m *LokiSeriesResponse) XXX_Size() int

func (*LokiSeriesResponse) XXX_Unmarshal

func (m *LokiSeriesResponse) XXX_Unmarshal(b []byte) error

type LokiSeriesResponseView

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

LokiSeriesResponseView holds the raw bytes of a LokiSeriesResponse protobuf message. It is decoded lazily view ForEachSeries.

func GetLokiSeriesResponseView

func GetLokiSeriesResponseView(data []byte) (view *LokiSeriesResponseView, err error)

GetLokiSeriesResponseView returns a view on the series response of a QueryResponse. Returns an error if the message was empty. Note: the method does not verify that the reply is a properly encoded QueryResponse protobuf.

func (*LokiSeriesResponseView) ForEachSeries

func (v *LokiSeriesResponseView) ForEachSeries(fn func(view *SeriesIdentifierView) error) error

ForEachSeries iterates of the []logproto.SeriesIdentifier slice and pass a view on each identifier to the callback supplied.

func (*LokiSeriesResponseView) GetHeaders

func (*LokiSeriesResponseView) ProtoMessage

func (v *LokiSeriesResponseView) ProtoMessage()

func (*LokiSeriesResponseView) Reset

func (v *LokiSeriesResponseView) Reset()

Implement proto.Message

func (*LokiSeriesResponseView) SetHeader

func (v *LokiSeriesResponseView) SetHeader(name, value string)

func (*LokiSeriesResponseView) String

func (v *LokiSeriesResponseView) String() string

func (*LokiSeriesResponseView) WithHeaders

type MergedSeriesResponseView

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

MergedSeriesResponseView holds references to all series responses that should be merged before serialization to JSON. The de-duplication happens during the ForEachUniqueSeries iteration.

func (*MergedSeriesResponseView) ForEachUniqueSeries

func (v *MergedSeriesResponseView) ForEachUniqueSeries(fn func(*SeriesIdentifierView) error) error

ForEachUniqueSeries iterates over all unique series identifiers of all series responses. It uses the HashFast method before passing the identifier view to the supplied callback.

func (*MergedSeriesResponseView) GetHeaders

func (*MergedSeriesResponseView) Materialize

func (v *MergedSeriesResponseView) Materialize() (*LokiSeriesResponse, error)

Materialize produces a LokiSeriesResponse instance that is a deserialized probobuf message.

func (*MergedSeriesResponseView) ProtoMessage

func (v *MergedSeriesResponseView) ProtoMessage()

func (*MergedSeriesResponseView) Reset

func (v *MergedSeriesResponseView) Reset()

Implement proto.Message

func (*MergedSeriesResponseView) SetHeader

func (v *MergedSeriesResponseView) SetHeader(name, value string)

func (*MergedSeriesResponseView) String

func (v *MergedSeriesResponseView) String() string

func (*MergedSeriesResponseView) WithHeaders

type MiddlewareMapperMetrics

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

func NewMiddlewareMapperMetrics

func NewMiddlewareMapperMetrics(registerer prometheus.Registerer) *MiddlewareMapperMetrics

type Plan

type Plan struct {
	Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"`
}

func (*Plan) Descriptor

func (*Plan) Descriptor() ([]byte, []int)

func (*Plan) Equal

func (this *Plan) Equal(that interface{}) bool

func (*Plan) GetRaw

func (m *Plan) GetRaw() []byte

func (*Plan) GoString

func (this *Plan) GoString() string

func (*Plan) Marshal

func (m *Plan) Marshal() (dAtA []byte, err error)

func (*Plan) MarshalTo

func (m *Plan) MarshalTo(dAtA []byte) (int, error)

func (*Plan) MarshalToSizedBuffer

func (m *Plan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) Reset

func (m *Plan) Reset()

func (*Plan) Size

func (m *Plan) Size() (n int)

func (*Plan) String

func (this *Plan) String() string

func (*Plan) Unmarshal

func (m *Plan) Unmarshal(dAtA []byte) error

func (*Plan) XXX_DiscardUnknown

func (m *Plan) XXX_DiscardUnknown()

func (*Plan) XXX_Marshal

func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Plan) XXX_Merge

func (m *Plan) XXX_Merge(src proto.Message)

func (*Plan) XXX_Size

func (m *Plan) XXX_Size() int

func (*Plan) XXX_Unmarshal

func (m *Plan) XXX_Unmarshal(b []byte) error

type PrometheusExtractor

type PrometheusExtractor struct{}

PrometheusExtractor implements Extractor interface

func (PrometheusExtractor) Extract

func (PrometheusExtractor) Extract(start, end int64, res resultscache.Response, resStart, resEnd int64) resultscache.Response

Extract wraps the original prometheus cache extractor

func (PrometheusExtractor) ResponseWithoutHeaders

func (PrometheusExtractor) ResponseWithoutHeaders(resp queryrangebase.Response) queryrangebase.Response

ResponseWithoutHeaders wraps the original prometheus caching without headers

type QuantileSketchResponse

type QuantileSketchResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.QuantileSketchMatrix                                           `` /* 141-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
	Warnings []string                                                                                                `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"`
}

func (*QuantileSketchResponse) Descriptor

func (*QuantileSketchResponse) Descriptor() ([]byte, []int)

func (*QuantileSketchResponse) Equal

func (this *QuantileSketchResponse) Equal(that interface{}) bool

func (*QuantileSketchResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*QuantileSketchResponse) GetWarnings

func (m *QuantileSketchResponse) GetWarnings() []string

func (*QuantileSketchResponse) GoString

func (this *QuantileSketchResponse) GoString() string

func (*QuantileSketchResponse) Marshal

func (m *QuantileSketchResponse) Marshal() (dAtA []byte, err error)

func (*QuantileSketchResponse) MarshalTo

func (m *QuantileSketchResponse) MarshalTo(dAtA []byte) (int, error)

func (*QuantileSketchResponse) MarshalToSizedBuffer

func (m *QuantileSketchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QuantileSketchResponse) ProtoMessage

func (*QuantileSketchResponse) ProtoMessage()

func (*QuantileSketchResponse) Reset

func (m *QuantileSketchResponse) Reset()

func (*QuantileSketchResponse) SetHeader

func (m *QuantileSketchResponse) SetHeader(name, value string)

func (*QuantileSketchResponse) Size

func (m *QuantileSketchResponse) Size() (n int)

func (*QuantileSketchResponse) String

func (this *QuantileSketchResponse) String() string

func (*QuantileSketchResponse) Unmarshal

func (m *QuantileSketchResponse) Unmarshal(dAtA []byte) error

func (*QuantileSketchResponse) WithHeaders

func (*QuantileSketchResponse) XXX_DiscardUnknown

func (m *QuantileSketchResponse) XXX_DiscardUnknown()

func (*QuantileSketchResponse) XXX_Marshal

func (m *QuantileSketchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuantileSketchResponse) XXX_Merge

func (m *QuantileSketchResponse) XXX_Merge(src proto.Message)

func (*QuantileSketchResponse) XXX_Size

func (m *QuantileSketchResponse) XXX_Size() int

func (*QuantileSketchResponse) XXX_Unmarshal

func (m *QuantileSketchResponse) XXX_Unmarshal(b []byte) error

type QueryMetrics

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

func NewMiddlewareQueryMetrics

func NewMiddlewareQueryMetrics(registerer prometheus.Registerer, metricsNamespace string) *QueryMetrics

type QueryPatternsResponse

type QueryPatternsResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.QueryPatternsResponse                                          `` /* 142-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
}

func (*QueryPatternsResponse) Descriptor

func (*QueryPatternsResponse) Descriptor() ([]byte, []int)

func (*QueryPatternsResponse) Equal

func (this *QueryPatternsResponse) Equal(that interface{}) bool

func (*QueryPatternsResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*QueryPatternsResponse) GoString

func (this *QueryPatternsResponse) GoString() string

func (*QueryPatternsResponse) Marshal

func (m *QueryPatternsResponse) Marshal() (dAtA []byte, err error)

func (*QueryPatternsResponse) MarshalTo

func (m *QueryPatternsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPatternsResponse) MarshalToSizedBuffer

func (m *QueryPatternsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPatternsResponse) ProtoMessage

func (*QueryPatternsResponse) ProtoMessage()

func (*QueryPatternsResponse) Reset

func (m *QueryPatternsResponse) Reset()

func (*QueryPatternsResponse) SetHeader

func (m *QueryPatternsResponse) SetHeader(name, value string)

func (*QueryPatternsResponse) Size

func (m *QueryPatternsResponse) Size() (n int)

func (*QueryPatternsResponse) String

func (this *QueryPatternsResponse) String() string

func (*QueryPatternsResponse) Unmarshal

func (m *QueryPatternsResponse) Unmarshal(dAtA []byte) error

func (*QueryPatternsResponse) WithHeaders

func (*QueryPatternsResponse) XXX_DiscardUnknown

func (m *QueryPatternsResponse) XXX_DiscardUnknown()

func (*QueryPatternsResponse) XXX_Marshal

func (m *QueryPatternsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPatternsResponse) XXX_Merge

func (m *QueryPatternsResponse) XXX_Merge(src proto.Message)

func (*QueryPatternsResponse) XXX_Size

func (m *QueryPatternsResponse) XXX_Size() int

func (*QueryPatternsResponse) XXX_Unmarshal

func (m *QueryPatternsResponse) XXX_Unmarshal(b []byte) error

type QueryRequest

type QueryRequest struct {
	// Types that are valid to be assigned to Request:
	//	*QueryRequest_Series
	//	*QueryRequest_Labels
	//	*QueryRequest_Stats
	//	*QueryRequest_Instant
	//	*QueryRequest_Streams
	//	*QueryRequest_Volume
	//	*QueryRequest_ShardsRequest
	//	*QueryRequest_DetectedFields
	//	*QueryRequest_PatternsRequest
	//	*QueryRequest_DetectedLabels
	Request  isQueryRequest_Request `protobuf_oneof:"request"`
	Metadata map[string]string      `` /* 147-byte string literal not displayed */
}

func (*QueryRequest) Descriptor

func (*QueryRequest) Descriptor() ([]byte, []int)

func (*QueryRequest) Equal

func (this *QueryRequest) Equal(that interface{}) bool

func (*QueryRequest) GetDetectedFields

func (m *QueryRequest) GetDetectedFields() *logproto.DetectedFieldsRequest

func (*QueryRequest) GetDetectedLabels

func (m *QueryRequest) GetDetectedLabels() *logproto.DetectedLabelsRequest

func (*QueryRequest) GetInstant

func (m *QueryRequest) GetInstant() *LokiInstantRequest

func (*QueryRequest) GetLabels

func (m *QueryRequest) GetLabels() *logproto.LabelRequest

func (*QueryRequest) GetMetadata

func (m *QueryRequest) GetMetadata() map[string]string

func (*QueryRequest) GetPatternsRequest

func (m *QueryRequest) GetPatternsRequest() *logproto.QueryPatternsRequest

func (*QueryRequest) GetRequest

func (m *QueryRequest) GetRequest() isQueryRequest_Request

func (*QueryRequest) GetSeries

func (m *QueryRequest) GetSeries() *LokiSeriesRequest

func (*QueryRequest) GetShardsRequest

func (m *QueryRequest) GetShardsRequest() *logproto.ShardsRequest

func (*QueryRequest) GetStats

func (m *QueryRequest) GetStats() *logproto.IndexStatsRequest

func (*QueryRequest) GetStreams

func (m *QueryRequest) GetStreams() *LokiRequest

func (*QueryRequest) GetVolume

func (m *QueryRequest) GetVolume() *logproto.VolumeRequest

func (*QueryRequest) GoString

func (this *QueryRequest) GoString() string

func (*QueryRequest) Marshal

func (m *QueryRequest) Marshal() (dAtA []byte, err error)

func (*QueryRequest) MarshalTo

func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest) MarshalToSizedBuffer

func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset

func (m *QueryRequest) Reset()

func (*QueryRequest) Size

func (m *QueryRequest) Size() (n int)

func (*QueryRequest) String

func (this *QueryRequest) String() string

func (*QueryRequest) Unmarshal

func (m *QueryRequest) Unmarshal(dAtA []byte) error

func (*QueryRequest) XXX_DiscardUnknown

func (m *QueryRequest) XXX_DiscardUnknown()

func (*QueryRequest) XXX_Marshal

func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRequest) XXX_Merge

func (m *QueryRequest) XXX_Merge(src proto.Message)

func (*QueryRequest) XXX_OneofWrappers

func (*QueryRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QueryRequest) XXX_Size

func (m *QueryRequest) XXX_Size() int

func (*QueryRequest) XXX_Unmarshal

func (m *QueryRequest) XXX_Unmarshal(b []byte) error

type QueryRequest_DetectedFields

type QueryRequest_DetectedFields struct {
	DetectedFields *logproto.DetectedFieldsRequest `protobuf:"bytes,9,opt,name=detectedFields,proto3,oneof"`
}

func (*QueryRequest_DetectedFields) Equal

func (this *QueryRequest_DetectedFields) Equal(that interface{}) bool

func (*QueryRequest_DetectedFields) GoString

func (this *QueryRequest_DetectedFields) GoString() string

func (*QueryRequest_DetectedFields) MarshalTo

func (m *QueryRequest_DetectedFields) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_DetectedFields) MarshalToSizedBuffer

func (m *QueryRequest_DetectedFields) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_DetectedFields) Size

func (m *QueryRequest_DetectedFields) Size() (n int)

func (*QueryRequest_DetectedFields) String

func (this *QueryRequest_DetectedFields) String() string

type QueryRequest_DetectedLabels

type QueryRequest_DetectedLabels struct {
	DetectedLabels *logproto.DetectedLabelsRequest `protobuf:"bytes,11,opt,name=detectedLabels,proto3,oneof"`
}

func (*QueryRequest_DetectedLabels) Equal

func (this *QueryRequest_DetectedLabels) Equal(that interface{}) bool

func (*QueryRequest_DetectedLabels) GoString

func (this *QueryRequest_DetectedLabels) GoString() string

func (*QueryRequest_DetectedLabels) MarshalTo

func (m *QueryRequest_DetectedLabels) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_DetectedLabels) MarshalToSizedBuffer

func (m *QueryRequest_DetectedLabels) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_DetectedLabels) Size

func (m *QueryRequest_DetectedLabels) Size() (n int)

func (*QueryRequest_DetectedLabels) String

func (this *QueryRequest_DetectedLabels) String() string

type QueryRequest_Instant

type QueryRequest_Instant struct {
	Instant *LokiInstantRequest `protobuf:"bytes,4,opt,name=instant,proto3,oneof"`
}

func (*QueryRequest_Instant) Equal

func (this *QueryRequest_Instant) Equal(that interface{}) bool

func (*QueryRequest_Instant) GoString

func (this *QueryRequest_Instant) GoString() string

func (*QueryRequest_Instant) MarshalTo

func (m *QueryRequest_Instant) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_Instant) MarshalToSizedBuffer

func (m *QueryRequest_Instant) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_Instant) Size

func (m *QueryRequest_Instant) Size() (n int)

func (*QueryRequest_Instant) String

func (this *QueryRequest_Instant) String() string

type QueryRequest_Labels

type QueryRequest_Labels struct {
	Labels *logproto.LabelRequest `protobuf:"bytes,2,opt,name=labels,proto3,oneof"`
}

func (*QueryRequest_Labels) Equal

func (this *QueryRequest_Labels) Equal(that interface{}) bool

func (*QueryRequest_Labels) GoString

func (this *QueryRequest_Labels) GoString() string

func (*QueryRequest_Labels) MarshalTo

func (m *QueryRequest_Labels) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_Labels) MarshalToSizedBuffer

func (m *QueryRequest_Labels) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_Labels) Size

func (m *QueryRequest_Labels) Size() (n int)

func (*QueryRequest_Labels) String

func (this *QueryRequest_Labels) String() string

type QueryRequest_PatternsRequest

type QueryRequest_PatternsRequest struct {
	PatternsRequest *logproto.QueryPatternsRequest `protobuf:"bytes,10,opt,name=patternsRequest,proto3,oneof"`
}

func (*QueryRequest_PatternsRequest) Equal

func (this *QueryRequest_PatternsRequest) Equal(that interface{}) bool

func (*QueryRequest_PatternsRequest) GoString

func (this *QueryRequest_PatternsRequest) GoString() string

func (*QueryRequest_PatternsRequest) MarshalTo

func (m *QueryRequest_PatternsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_PatternsRequest) MarshalToSizedBuffer

func (m *QueryRequest_PatternsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_PatternsRequest) Size

func (m *QueryRequest_PatternsRequest) Size() (n int)

func (*QueryRequest_PatternsRequest) String

func (this *QueryRequest_PatternsRequest) String() string

type QueryRequest_Series

type QueryRequest_Series struct {
	Series *LokiSeriesRequest `protobuf:"bytes,1,opt,name=series,proto3,oneof"`
}

func (*QueryRequest_Series) Equal

func (this *QueryRequest_Series) Equal(that interface{}) bool

func (*QueryRequest_Series) GoString

func (this *QueryRequest_Series) GoString() string

func (*QueryRequest_Series) MarshalTo

func (m *QueryRequest_Series) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_Series) MarshalToSizedBuffer

func (m *QueryRequest_Series) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_Series) Size

func (m *QueryRequest_Series) Size() (n int)

func (*QueryRequest_Series) String

func (this *QueryRequest_Series) String() string

type QueryRequest_ShardsRequest

type QueryRequest_ShardsRequest struct {
	ShardsRequest *logproto.ShardsRequest `protobuf:"bytes,8,opt,name=shardsRequest,proto3,oneof"`
}

func (*QueryRequest_ShardsRequest) Equal

func (this *QueryRequest_ShardsRequest) Equal(that interface{}) bool

func (*QueryRequest_ShardsRequest) GoString

func (this *QueryRequest_ShardsRequest) GoString() string

func (*QueryRequest_ShardsRequest) MarshalTo

func (m *QueryRequest_ShardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_ShardsRequest) MarshalToSizedBuffer

func (m *QueryRequest_ShardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_ShardsRequest) Size

func (m *QueryRequest_ShardsRequest) Size() (n int)

func (*QueryRequest_ShardsRequest) String

func (this *QueryRequest_ShardsRequest) String() string

type QueryRequest_Stats

type QueryRequest_Stats struct {
	Stats *logproto.IndexStatsRequest `protobuf:"bytes,3,opt,name=stats,proto3,oneof"`
}

func (*QueryRequest_Stats) Equal

func (this *QueryRequest_Stats) Equal(that interface{}) bool

func (*QueryRequest_Stats) GoString

func (this *QueryRequest_Stats) GoString() string

func (*QueryRequest_Stats) MarshalTo

func (m *QueryRequest_Stats) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_Stats) MarshalToSizedBuffer

func (m *QueryRequest_Stats) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_Stats) Size

func (m *QueryRequest_Stats) Size() (n int)

func (*QueryRequest_Stats) String

func (this *QueryRequest_Stats) String() string

type QueryRequest_Streams

type QueryRequest_Streams struct {
	Streams *LokiRequest `protobuf:"bytes,5,opt,name=streams,proto3,oneof"`
}

func (*QueryRequest_Streams) Equal

func (this *QueryRequest_Streams) Equal(that interface{}) bool

func (*QueryRequest_Streams) GoString

func (this *QueryRequest_Streams) GoString() string

func (*QueryRequest_Streams) MarshalTo

func (m *QueryRequest_Streams) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_Streams) MarshalToSizedBuffer

func (m *QueryRequest_Streams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_Streams) Size

func (m *QueryRequest_Streams) Size() (n int)

func (*QueryRequest_Streams) String

func (this *QueryRequest_Streams) String() string

type QueryRequest_Volume

type QueryRequest_Volume struct {
	Volume *logproto.VolumeRequest `protobuf:"bytes,6,opt,name=volume,proto3,oneof"`
}

func (*QueryRequest_Volume) Equal

func (this *QueryRequest_Volume) Equal(that interface{}) bool

func (*QueryRequest_Volume) GoString

func (this *QueryRequest_Volume) GoString() string

func (*QueryRequest_Volume) MarshalTo

func (m *QueryRequest_Volume) MarshalTo(dAtA []byte) (int, error)

func (*QueryRequest_Volume) MarshalToSizedBuffer

func (m *QueryRequest_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest_Volume) Size

func (m *QueryRequest_Volume) Size() (n int)

func (*QueryRequest_Volume) String

func (this *QueryRequest_Volume) String() string

type QueryResponse

type QueryResponse struct {
	Status *rpc.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Types that are valid to be assigned to Response:
	//	*QueryResponse_Series
	//	*QueryResponse_Labels
	//	*QueryResponse_Stats
	//	*QueryResponse_Prom
	//	*QueryResponse_Streams
	//	*QueryResponse_Volume
	//	*QueryResponse_TopkSketches
	//	*QueryResponse_QuantileSketches
	//	*QueryResponse_ShardsResponse
	//	*QueryResponse_DetectedFields
	//	*QueryResponse_PatternsResponse
	//	*QueryResponse_DetectedLabels
	Response isQueryResponse_Response `protobuf_oneof:"response"`
}

func QueryResponseWrap

func QueryResponseWrap(res queryrangebase.Response) (*QueryResponse, error)

func QueryResponseWrapError

func QueryResponseWrapError(err error) *QueryResponse

QueryResponseWrapError wraps an error in the QueryResponse protobuf.

func (*QueryResponse) Descriptor

func (*QueryResponse) Descriptor() ([]byte, []int)

func (*QueryResponse) Equal

func (this *QueryResponse) Equal(that interface{}) bool

func (*QueryResponse) GetDetectedFields

func (m *QueryResponse) GetDetectedFields() *DetectedFieldsResponse

func (*QueryResponse) GetDetectedLabels

func (m *QueryResponse) GetDetectedLabels() *DetectedLabelsResponse

func (*QueryResponse) GetLabels

func (m *QueryResponse) GetLabels() *LokiLabelNamesResponse

func (*QueryResponse) GetPatternsResponse

func (m *QueryResponse) GetPatternsResponse() *QueryPatternsResponse

func (*QueryResponse) GetProm

func (m *QueryResponse) GetProm() *LokiPromResponse

func (*QueryResponse) GetQuantileSketches

func (m *QueryResponse) GetQuantileSketches() *QuantileSketchResponse

func (*QueryResponse) GetResponse

func (m *QueryResponse) GetResponse() isQueryResponse_Response

func (*QueryResponse) GetSeries

func (m *QueryResponse) GetSeries() *LokiSeriesResponse

func (*QueryResponse) GetShardsResponse

func (m *QueryResponse) GetShardsResponse() *ShardsResponse

func (*QueryResponse) GetStats

func (m *QueryResponse) GetStats() *IndexStatsResponse

func (*QueryResponse) GetStatus

func (m *QueryResponse) GetStatus() *rpc.Status

func (*QueryResponse) GetStreams

func (m *QueryResponse) GetStreams() *LokiResponse

func (*QueryResponse) GetTopkSketches

func (m *QueryResponse) GetTopkSketches() *TopKSketchesResponse

func (*QueryResponse) GetVolume

func (m *QueryResponse) GetVolume() *VolumeResponse

func (*QueryResponse) GoString

func (this *QueryResponse) GoString() string

func (*QueryResponse) Marshal

func (m *QueryResponse) Marshal() (dAtA []byte, err error)

func (*QueryResponse) MarshalTo

func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse) MarshalToSizedBuffer

func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset

func (m *QueryResponse) Reset()

func (*QueryResponse) Size

func (m *QueryResponse) Size() (n int)

func (*QueryResponse) String

func (this *QueryResponse) String() string

func (*QueryResponse) Unmarshal

func (m *QueryResponse) Unmarshal(dAtA []byte) error

func (*QueryResponse) XXX_DiscardUnknown

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal

func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResponse) XXX_Merge

func (m *QueryResponse) XXX_Merge(src proto.Message)

func (*QueryResponse) XXX_OneofWrappers

func (*QueryResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QueryResponse) XXX_Size

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal

func (m *QueryResponse) XXX_Unmarshal(b []byte) error

type QueryResponse_DetectedFields

type QueryResponse_DetectedFields struct {
	DetectedFields *DetectedFieldsResponse `protobuf:"bytes,11,opt,name=detectedFields,proto3,oneof"`
}

func (*QueryResponse_DetectedFields) Equal

func (this *QueryResponse_DetectedFields) Equal(that interface{}) bool

func (*QueryResponse_DetectedFields) GoString

func (this *QueryResponse_DetectedFields) GoString() string

func (*QueryResponse_DetectedFields) MarshalTo

func (m *QueryResponse_DetectedFields) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_DetectedFields) MarshalToSizedBuffer

func (m *QueryResponse_DetectedFields) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_DetectedFields) Size

func (m *QueryResponse_DetectedFields) Size() (n int)

func (*QueryResponse_DetectedFields) String

func (this *QueryResponse_DetectedFields) String() string

type QueryResponse_DetectedLabels

type QueryResponse_DetectedLabels struct {
	DetectedLabels *DetectedLabelsResponse `protobuf:"bytes,13,opt,name=detectedLabels,proto3,oneof"`
}

func (*QueryResponse_DetectedLabels) Equal

func (this *QueryResponse_DetectedLabels) Equal(that interface{}) bool

func (*QueryResponse_DetectedLabels) GoString

func (this *QueryResponse_DetectedLabels) GoString() string

func (*QueryResponse_DetectedLabels) MarshalTo

func (m *QueryResponse_DetectedLabels) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_DetectedLabels) MarshalToSizedBuffer

func (m *QueryResponse_DetectedLabels) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_DetectedLabels) Size

func (m *QueryResponse_DetectedLabels) Size() (n int)

func (*QueryResponse_DetectedLabels) String

func (this *QueryResponse_DetectedLabels) String() string

type QueryResponse_Labels

type QueryResponse_Labels struct {
	Labels *LokiLabelNamesResponse `protobuf:"bytes,3,opt,name=labels,proto3,oneof"`
}

func (*QueryResponse_Labels) Equal

func (this *QueryResponse_Labels) Equal(that interface{}) bool

func (*QueryResponse_Labels) GoString

func (this *QueryResponse_Labels) GoString() string

func (*QueryResponse_Labels) MarshalTo

func (m *QueryResponse_Labels) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_Labels) MarshalToSizedBuffer

func (m *QueryResponse_Labels) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Labels) Size

func (m *QueryResponse_Labels) Size() (n int)

func (*QueryResponse_Labels) String

func (this *QueryResponse_Labels) String() string

type QueryResponse_PatternsResponse

type QueryResponse_PatternsResponse struct {
	PatternsResponse *QueryPatternsResponse `protobuf:"bytes,12,opt,name=patternsResponse,proto3,oneof"`
}

func (*QueryResponse_PatternsResponse) Equal

func (this *QueryResponse_PatternsResponse) Equal(that interface{}) bool

func (*QueryResponse_PatternsResponse) GoString

func (this *QueryResponse_PatternsResponse) GoString() string

func (*QueryResponse_PatternsResponse) MarshalTo

func (m *QueryResponse_PatternsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_PatternsResponse) MarshalToSizedBuffer

func (m *QueryResponse_PatternsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_PatternsResponse) Size

func (m *QueryResponse_PatternsResponse) Size() (n int)

func (*QueryResponse_PatternsResponse) String

func (this *QueryResponse_PatternsResponse) String() string

type QueryResponse_Prom

type QueryResponse_Prom struct {
	Prom *LokiPromResponse `protobuf:"bytes,5,opt,name=prom,proto3,oneof"`
}

func (*QueryResponse_Prom) Equal

func (this *QueryResponse_Prom) Equal(that interface{}) bool

func (*QueryResponse_Prom) GoString

func (this *QueryResponse_Prom) GoString() string

func (*QueryResponse_Prom) MarshalTo

func (m *QueryResponse_Prom) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_Prom) MarshalToSizedBuffer

func (m *QueryResponse_Prom) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Prom) Size

func (m *QueryResponse_Prom) Size() (n int)

func (*QueryResponse_Prom) String

func (this *QueryResponse_Prom) String() string

type QueryResponse_QuantileSketches

type QueryResponse_QuantileSketches struct {
	QuantileSketches *QuantileSketchResponse `protobuf:"bytes,9,opt,name=quantileSketches,proto3,oneof"`
}

func (*QueryResponse_QuantileSketches) Equal

func (this *QueryResponse_QuantileSketches) Equal(that interface{}) bool

func (*QueryResponse_QuantileSketches) GoString

func (this *QueryResponse_QuantileSketches) GoString() string

func (*QueryResponse_QuantileSketches) MarshalTo

func (m *QueryResponse_QuantileSketches) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_QuantileSketches) MarshalToSizedBuffer

func (m *QueryResponse_QuantileSketches) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_QuantileSketches) Size

func (m *QueryResponse_QuantileSketches) Size() (n int)

func (*QueryResponse_QuantileSketches) String

func (this *QueryResponse_QuantileSketches) String() string

type QueryResponse_Series

type QueryResponse_Series struct {
	Series *LokiSeriesResponse `protobuf:"bytes,2,opt,name=series,proto3,oneof"`
}

func (*QueryResponse_Series) Equal

func (this *QueryResponse_Series) Equal(that interface{}) bool

func (*QueryResponse_Series) GoString

func (this *QueryResponse_Series) GoString() string

func (*QueryResponse_Series) MarshalTo

func (m *QueryResponse_Series) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_Series) MarshalToSizedBuffer

func (m *QueryResponse_Series) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Series) Size

func (m *QueryResponse_Series) Size() (n int)

func (*QueryResponse_Series) String

func (this *QueryResponse_Series) String() string

type QueryResponse_ShardsResponse

type QueryResponse_ShardsResponse struct {
	ShardsResponse *ShardsResponse `protobuf:"bytes,10,opt,name=shardsResponse,proto3,oneof"`
}

func (*QueryResponse_ShardsResponse) Equal

func (this *QueryResponse_ShardsResponse) Equal(that interface{}) bool

func (*QueryResponse_ShardsResponse) GoString

func (this *QueryResponse_ShardsResponse) GoString() string

func (*QueryResponse_ShardsResponse) MarshalTo

func (m *QueryResponse_ShardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_ShardsResponse) MarshalToSizedBuffer

func (m *QueryResponse_ShardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_ShardsResponse) Size

func (m *QueryResponse_ShardsResponse) Size() (n int)

func (*QueryResponse_ShardsResponse) String

func (this *QueryResponse_ShardsResponse) String() string

type QueryResponse_Stats

type QueryResponse_Stats struct {
	Stats *IndexStatsResponse `protobuf:"bytes,4,opt,name=stats,proto3,oneof"`
}

func (*QueryResponse_Stats) Equal

func (this *QueryResponse_Stats) Equal(that interface{}) bool

func (*QueryResponse_Stats) GoString

func (this *QueryResponse_Stats) GoString() string

func (*QueryResponse_Stats) MarshalTo

func (m *QueryResponse_Stats) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_Stats) MarshalToSizedBuffer

func (m *QueryResponse_Stats) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Stats) Size

func (m *QueryResponse_Stats) Size() (n int)

func (*QueryResponse_Stats) String

func (this *QueryResponse_Stats) String() string

type QueryResponse_Streams

type QueryResponse_Streams struct {
	Streams *LokiResponse `protobuf:"bytes,6,opt,name=streams,proto3,oneof"`
}

func (*QueryResponse_Streams) Equal

func (this *QueryResponse_Streams) Equal(that interface{}) bool

func (*QueryResponse_Streams) GoString

func (this *QueryResponse_Streams) GoString() string

func (*QueryResponse_Streams) MarshalTo

func (m *QueryResponse_Streams) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_Streams) MarshalToSizedBuffer

func (m *QueryResponse_Streams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Streams) Size

func (m *QueryResponse_Streams) Size() (n int)

func (*QueryResponse_Streams) String

func (this *QueryResponse_Streams) String() string

type QueryResponse_TopkSketches

type QueryResponse_TopkSketches struct {
	TopkSketches *TopKSketchesResponse `protobuf:"bytes,8,opt,name=topkSketches,proto3,oneof"`
}

func (*QueryResponse_TopkSketches) Equal

func (this *QueryResponse_TopkSketches) Equal(that interface{}) bool

func (*QueryResponse_TopkSketches) GoString

func (this *QueryResponse_TopkSketches) GoString() string

func (*QueryResponse_TopkSketches) MarshalTo

func (m *QueryResponse_TopkSketches) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_TopkSketches) MarshalToSizedBuffer

func (m *QueryResponse_TopkSketches) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_TopkSketches) Size

func (m *QueryResponse_TopkSketches) Size() (n int)

func (*QueryResponse_TopkSketches) String

func (this *QueryResponse_TopkSketches) String() string

type QueryResponse_Volume

type QueryResponse_Volume struct {
	Volume *VolumeResponse `protobuf:"bytes,7,opt,name=volume,proto3,oneof"`
}

func (*QueryResponse_Volume) Equal

func (this *QueryResponse_Volume) Equal(that interface{}) bool

func (*QueryResponse_Volume) GoString

func (this *QueryResponse_Volume) GoString() string

func (*QueryResponse_Volume) MarshalTo

func (m *QueryResponse_Volume) MarshalTo(dAtA []byte) (int, error)

func (*QueryResponse_Volume) MarshalToSizedBuffer

func (m *QueryResponse_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Volume) Size

func (m *QueryResponse_Volume) Size() (n int)

func (*QueryResponse_Volume) String

func (this *QueryResponse_Volume) String() string

type RequestProtobufCodec

type RequestProtobufCodec struct {
	Codec
}

func (RequestProtobufCodec) EncodeRequest

type SemaphoreWithTiming

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

func NewSemaphoreWithTiming

func NewSemaphoreWithTiming(max int64) *SemaphoreWithTiming

func (*SemaphoreWithTiming) Acquire

func (s *SemaphoreWithTiming) Acquire(ctx context.Context, n int64) (time.Duration, error)

acquires the semaphore and records the time it takes.

type SeriesCacheConfig

type SeriesCacheConfig struct {
	queryrangebase.ResultsCacheConfig `yaml:",inline"`
}

func (*SeriesCacheConfig) RegisterFlags

func (cfg *SeriesCacheConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

func (*SeriesCacheConfig) Validate

func (cfg *SeriesCacheConfig) Validate() error

type SeriesIdentifierView

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

SeriesIdentifierView holds the raw bytes of a logproto.SeriesIdentifier protobuf message.

func (*SeriesIdentifierView) ForEachLabel

func (v *SeriesIdentifierView) ForEachLabel(fn func(string, string) error) error

ForEachLabel iterates over each name-value label pair of the identifier map. Note: the strings passed to the supplied callback are unsafe views on the underlying data.

func (*SeriesIdentifierView) Hash

func (v *SeriesIdentifierView) Hash(b []byte, keyLabelPairs []string) (uint64, []string, error)

Hash is adapted from SeriesIdentifier.Hash and produces the same hash for the same input as the original Prometheus hash method.

func (*SeriesIdentifierView) HashFast

func (v *SeriesIdentifierView) HashFast(b []byte, keyLabelPairs []string) (uint64, []string, error)

HashFast is a faster version of the Hash method that uses an unsafe string of the name value label pairs. It does not have to allocate strings and is not using the separator. Thus it is not equivalent to the original Prometheus label hash function.

type ShardingConfigs

type ShardingConfigs []config.PeriodConfig

ShardingConfigs is a slice of chunk shard configs

func (ShardingConfigs) GetConf

func (confs ShardingConfigs) GetConf(start, end int64) (config.PeriodConfig, error)

GetConf will extract a shardable config corresponding to a request and the shardingconfigs

func (ShardingConfigs) ValidRange

func (confs ShardingConfigs) ValidRange(start, end int64) (config.PeriodConfig, error)

ValidRange extracts a non-overlapping sharding configuration from a list of configs and a time range.

type ShardsResponse

type ShardsResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.ShardsResponse                                                 `` /* 135-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
}

func (*ShardsResponse) Descriptor

func (*ShardsResponse) Descriptor() ([]byte, []int)

func (*ShardsResponse) Equal

func (this *ShardsResponse) Equal(that interface{}) bool

func (*ShardsResponse) GetHeaders

func (*ShardsResponse) GoString

func (this *ShardsResponse) GoString() string

func (*ShardsResponse) Marshal

func (m *ShardsResponse) Marshal() (dAtA []byte, err error)

func (*ShardsResponse) MarshalTo

func (m *ShardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*ShardsResponse) MarshalToSizedBuffer

func (m *ShardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ShardsResponse) ProtoMessage

func (*ShardsResponse) ProtoMessage()

func (*ShardsResponse) Reset

func (m *ShardsResponse) Reset()

func (*ShardsResponse) SetHeader

func (m *ShardsResponse) SetHeader(name, value string)

func (*ShardsResponse) Size

func (m *ShardsResponse) Size() (n int)

func (*ShardsResponse) String

func (this *ShardsResponse) String() string

func (*ShardsResponse) Unmarshal

func (m *ShardsResponse) Unmarshal(dAtA []byte) error

func (*ShardsResponse) WithHeaders

func (*ShardsResponse) XXX_DiscardUnknown

func (m *ShardsResponse) XXX_DiscardUnknown()

func (*ShardsResponse) XXX_Marshal

func (m *ShardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShardsResponse) XXX_Merge

func (m *ShardsResponse) XXX_Merge(src proto.Message)

func (*ShardsResponse) XXX_Size

func (m *ShardsResponse) XXX_Size() int

func (*ShardsResponse) XXX_Unmarshal

func (m *ShardsResponse) XXX_Unmarshal(b []byte) error

type SplitByMetrics

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

func NewSplitByMetrics

func NewSplitByMetrics(r prometheus.Registerer) *SplitByMetrics

type Stopper

type Stopper interface {
	Stop()
}

Stopper gracefully shutdown resources created

func NewMiddleware

func NewMiddleware(
	cfg Config,
	engineOpts logql.EngineOpts,
	iqo util.IngesterQueryOptions,
	log log.Logger,
	limits Limits,
	schema config.SchemaConfig,
	cacheGenNumLoader base.CacheGenNumberLoader,
	retentionEnabled bool,
	registerer prometheus.Registerer,
	metricsNamespace string,
) (base.Middleware, Stopper, error)

NewMiddleware returns a Middleware configured with middlewares to align, split and cache requests.

type StopperWrapper

type StopperWrapper []Stopper

func (StopperWrapper) Stop

func (s StopperWrapper) Stop()

Stop gracefully shutdowns created resources

type TopKSketchesResponse

type TopKSketchesResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.TopKMatrix                                                     `` /* 131-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
	Warnings []string                                                                                                `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"`
}

func (*TopKSketchesResponse) Descriptor

func (*TopKSketchesResponse) Descriptor() ([]byte, []int)

func (*TopKSketchesResponse) Equal

func (this *TopKSketchesResponse) Equal(that interface{}) bool

func (*TopKSketchesResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*TopKSketchesResponse) GetWarnings

func (m *TopKSketchesResponse) GetWarnings() []string

func (*TopKSketchesResponse) GoString

func (this *TopKSketchesResponse) GoString() string

func (*TopKSketchesResponse) Marshal

func (m *TopKSketchesResponse) Marshal() (dAtA []byte, err error)

func (*TopKSketchesResponse) MarshalTo

func (m *TopKSketchesResponse) MarshalTo(dAtA []byte) (int, error)

func (*TopKSketchesResponse) MarshalToSizedBuffer

func (m *TopKSketchesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TopKSketchesResponse) ProtoMessage

func (*TopKSketchesResponse) ProtoMessage()

func (*TopKSketchesResponse) Reset

func (m *TopKSketchesResponse) Reset()

func (*TopKSketchesResponse) SetHeader

func (m *TopKSketchesResponse) SetHeader(name, value string)

func (*TopKSketchesResponse) Size

func (m *TopKSketchesResponse) Size() (n int)

func (*TopKSketchesResponse) String

func (this *TopKSketchesResponse) String() string

func (*TopKSketchesResponse) Unmarshal

func (m *TopKSketchesResponse) Unmarshal(dAtA []byte) error

func (*TopKSketchesResponse) WithHeaders

func (*TopKSketchesResponse) XXX_DiscardUnknown

func (m *TopKSketchesResponse) XXX_DiscardUnknown()

func (*TopKSketchesResponse) XXX_Marshal

func (m *TopKSketchesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TopKSketchesResponse) XXX_Merge

func (m *TopKSketchesResponse) XXX_Merge(src proto.Message)

func (*TopKSketchesResponse) XXX_Size

func (m *TopKSketchesResponse) XXX_Size() int

func (*TopKSketchesResponse) XXX_Unmarshal

func (m *TopKSketchesResponse) XXX_Unmarshal(b []byte) error

type Tracer

type Tracer struct{}

func (Tracer) Wrap

Wrap implements the queryrangebase.Middleware

type UserIDTransformer

type UserIDTransformer func(context.Context, string) string

type VolumeCacheConfig

type VolumeCacheConfig struct {
	queryrangebase.ResultsCacheConfig `yaml:",inline"`
}

func (*VolumeCacheConfig) RegisterFlags

func (cfg *VolumeCacheConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

func (*VolumeCacheConfig) Validate

func (cfg *VolumeCacheConfig) Validate() error

type VolumeExtractor

type VolumeExtractor struct{}

func (VolumeExtractor) Extract

func (p VolumeExtractor) Extract(start, end int64, res resultscache.Response, resStart, resEnd int64) resultscache.Response

Extract favors the ability to cache over exactness of results. It assumes a constant distribution of log volumes over a range and will extract subsets proportionally.

func (VolumeExtractor) ResponseWithoutHeaders

func (p VolumeExtractor) ResponseWithoutHeaders(resp queryrangebase.Response) queryrangebase.Response

type VolumeResponse

type VolumeResponse struct {
	Response *github_com_grafana_loki_v3_pkg_logproto.VolumeResponse                                                 `` /* 135-byte string literal not displayed */
	Headers  []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 164-byte string literal not displayed */
}

func (*VolumeResponse) Descriptor

func (*VolumeResponse) Descriptor() ([]byte, []int)

func (*VolumeResponse) Equal

func (this *VolumeResponse) Equal(that interface{}) bool

func (*VolumeResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*VolumeResponse) GoString

func (this *VolumeResponse) GoString() string

func (*VolumeResponse) Marshal

func (m *VolumeResponse) Marshal() (dAtA []byte, err error)

func (*VolumeResponse) MarshalTo

func (m *VolumeResponse) MarshalTo(dAtA []byte) (int, error)

func (*VolumeResponse) MarshalToSizedBuffer

func (m *VolumeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VolumeResponse) ProtoMessage

func (*VolumeResponse) ProtoMessage()

func (*VolumeResponse) Reset

func (m *VolumeResponse) Reset()

func (*VolumeResponse) SetHeader

func (m *VolumeResponse) SetHeader(name, value string)

func (*VolumeResponse) Size

func (m *VolumeResponse) Size() (n int)

func (*VolumeResponse) String

func (this *VolumeResponse) String() string

func (*VolumeResponse) Unmarshal

func (m *VolumeResponse) Unmarshal(dAtA []byte) error

func (*VolumeResponse) WithHeaders

func (*VolumeResponse) XXX_DiscardUnknown

func (m *VolumeResponse) XXX_DiscardUnknown()

func (*VolumeResponse) XXX_Marshal

func (m *VolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VolumeResponse) XXX_Merge

func (m *VolumeResponse) XXX_Merge(src proto.Message)

func (*VolumeResponse) XXX_Size

func (m *VolumeResponse) XXX_Size() int

func (*VolumeResponse) XXX_Unmarshal

func (m *VolumeResponse) XXX_Unmarshal(b []byte) error

type VolumeSplitter

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

func (VolumeSplitter) GenerateCacheKey

func (i VolumeSplitter) GenerateCacheKey(ctx context.Context, userID string, r resultscache.Request) string

GenerateCacheKey generates a cache key based on the userID, Request and interval.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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