queryrange

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: AGPL-3.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstantQueryOp = "instant_query"
	QueryRangeOp   = "query_range"
	SeriesOp       = "series"
	LabelNamesOp   = "labels"
	IndexStatsOp   = "index_stats"
	LabelVolumeOp  = "label_volume"
)
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 (
	ErrMaxQueryParalellism = fmt.Errorf("querying is disabled, please contact your Loki operator")
)
View Source
var LokiCodec = &Codec{}
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,
	shouldCache queryrangebase.ShouldCacheFn,
	parallelismForReq func(ctx context.Context, tenantIDs []string, r queryrangebase.Request) int,
	retentionEnabled bool,
	transformer UserIDTransformer,
	metrics *queryrangebase.ResultsCacheMetrics,
) (queryrangebase.Middleware, error)

func NewIndexStatsTripperware

func NewIndexStatsTripperware(
	cfg Config,
	log log.Logger,
	limits Limits,
	schema config.SchemaConfig,
	codec queryrangebase.Codec,
	c cache.Cache,
	cacheGenNumLoader queryrangebase.CacheGenNumberLoader,
	retentionEnabled bool,
	metrics *Metrics,
) (queryrangebase.Tripperware, error)

func NewInstantMetricTripperware

func NewInstantMetricTripperware(
	cfg Config,
	engineOpts logql.EngineOpts,
	log log.Logger,
	limits Limits,
	schema config.SchemaConfig,
	codec queryrangebase.Codec,
	metrics *Metrics,
	indexStatsTripperware queryrangebase.Tripperware,
) (queryrangebase.Tripperware, error)

NewInstantMetricTripperware creates a new frontend tripperware responsible for handling metric queries

func NewLabelVolumeTripperware

func NewLabelVolumeTripperware(cfg Config,
	log log.Logger,
	limits Limits,
	schema config.SchemaConfig,
	codec queryrangebase.Codec,
	c cache.Cache,
	cacheGenNumLoader queryrangebase.CacheGenNumberLoader,
	retentionEnabled bool,
	metrics *Metrics,
) (queryrangebase.Tripperware, error)

func NewLabelsTripperware

func NewLabelsTripperware(
	cfg Config,
	log log.Logger,
	limits Limits,
	codec queryrangebase.Codec,
	metrics *Metrics,
	schema config.SchemaConfig,
) (queryrangebase.Tripperware, error)

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

func NewLimitedRoundTripper

func NewLimitedRoundTripper(next http.RoundTripper, codec queryrangebase.Codec, limits Limits, configs []config.PeriodConfig, middlewares ...queryrangebase.Middleware) http.RoundTripper

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,
	codec queryrangebase.Codec,
	metrics *Metrics,
	indexStatsTripperware queryrangebase.Tripperware,
) (queryrangebase.Tripperware, 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,
	codec queryrangebase.Codec,
	c cache.Cache,
	metrics *Metrics,
	indexStatsTripperware queryrangebase.Tripperware,
) (queryrangebase.Tripperware, 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,
	codec queryrangebase.Codec,
	c cache.Cache,
	cacheGenNumLoader queryrangebase.CacheGenNumberLoader,
	retentionEnabled bool,
	extractor queryrangebase.Extractor,
	metrics *Metrics,
	indexStatsTripperware queryrangebase.Tripperware,
) (queryrangebase.Tripperware, 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,
	_ queryrangebase.Codec,
	middlewareMetrics *queryrangebase.InstrumentMiddlewareMetrics,
	shardingMetrics *logql.MapperMetrics,
	limits Limits,
	maxShards int,
	statsHandler queryrangebase.Handler,
) 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 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,
	codec queryrangebase.Codec,
	metrics *Metrics,
	schema config.SchemaConfig,
) (queryrangebase.Tripperware, error)

NewSeriesTripperware creates a new frontend tripperware responsible for handling series requests

func NewSplitByRangeMiddleware

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

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

func ParamsToLokiRequest

func ParamsToLokiRequest(params logql.Params, shards logql.Shards) queryrangebase.Request

func ResponseToResult

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

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

Types

type Buffer

type Buffer interface {
	Bytes() []byte
}

type Codec

type Codec struct{}

func (Codec) DecodeRequest

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

func (Codec) EncodeRequest

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

func (Codec) EncodeResponse

func (Codec) EncodeResponse(ctx context.Context, 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

type Config

type Config struct {
	queryrangebase.Config  `yaml:",inline"`
	Transformer            UserIDTransformer     `yaml:"-"`
	CacheIndexStatsResults bool                  `yaml:"cache_index_stats_results"`
	StatsCacheConfig       IndexStatsCacheConfig `` /* 166-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 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 queryrangebase.Response, resStart, resEnd int64) queryrangebase.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_pkg_logproto.IndexStatsResponse                                             `` /* 136-byte string literal not displayed */
	Headers  []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 161-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) 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) 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 queryrangebase.Request) string

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

type LabelVolumeRequest

type LabelVolumeRequest 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"`
}

func (*LabelVolumeRequest) Descriptor

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

func (*LabelVolumeRequest) Equal

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

func (*LabelVolumeRequest) GetEndTs

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

func (*LabelVolumeRequest) GetMatch

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

func (*LabelVolumeRequest) GetStartTs

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

func (*LabelVolumeRequest) GoString

func (this *LabelVolumeRequest) GoString() string

func (*LabelVolumeRequest) Marshal

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

func (*LabelVolumeRequest) MarshalTo

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

func (*LabelVolumeRequest) MarshalToSizedBuffer

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

func (*LabelVolumeRequest) ProtoMessage

func (*LabelVolumeRequest) ProtoMessage()

func (*LabelVolumeRequest) Reset

func (m *LabelVolumeRequest) Reset()

func (*LabelVolumeRequest) Size

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

func (*LabelVolumeRequest) String

func (this *LabelVolumeRequest) String() string

func (*LabelVolumeRequest) Unmarshal

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

func (*LabelVolumeRequest) XXX_DiscardUnknown

func (m *LabelVolumeRequest) XXX_DiscardUnknown()

func (*LabelVolumeRequest) XXX_Marshal

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

func (*LabelVolumeRequest) XXX_Merge

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

func (*LabelVolumeRequest) XXX_Size

func (m *LabelVolumeRequest) XXX_Size() int

func (*LabelVolumeRequest) XXX_Unmarshal

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

type LabelVolumeResponse

type LabelVolumeResponse struct {
	Response *github_com_grafana_loki_pkg_logproto.LabelVolumeResponse                                            `` /* 137-byte string literal not displayed */
	Headers  []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 161-byte string literal not displayed */
}

func (*LabelVolumeResponse) Descriptor

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

func (*LabelVolumeResponse) Equal

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

func (*LabelVolumeResponse) GetHeaders

GetHeaders returns the HTTP headers in the response.

func (*LabelVolumeResponse) GoString

func (this *LabelVolumeResponse) GoString() string

func (*LabelVolumeResponse) Marshal

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

func (*LabelVolumeResponse) MarshalTo

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

func (*LabelVolumeResponse) MarshalToSizedBuffer

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

func (*LabelVolumeResponse) ProtoMessage

func (*LabelVolumeResponse) ProtoMessage()

func (*LabelVolumeResponse) Reset

func (m *LabelVolumeResponse) Reset()

func (*LabelVolumeResponse) Size

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

func (*LabelVolumeResponse) String

func (this *LabelVolumeResponse) String() string

func (*LabelVolumeResponse) Unmarshal

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

func (*LabelVolumeResponse) XXX_DiscardUnknown

func (m *LabelVolumeResponse) XXX_DiscardUnknown()

func (*LabelVolumeResponse) XXX_Marshal

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

func (*LabelVolumeResponse) XXX_Merge

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

func (*LabelVolumeResponse) XXX_Size

func (m *LabelVolumeResponse) XXX_Size() int

func (*LabelVolumeResponse) XXX_Unmarshal

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

type Limits

type Limits interface {
	queryrangebase.Limits
	logql.Limits
	QuerySplitDuration(string) time.Duration
	MaxQuerySeries(context.Context, string) int
	MaxEntriesLimitPerQuery(context.Context, string) int
	MinShardingLookback(string) time.Duration
	// TSDBMaxQueryParallelism returns the limit to the number of split queries the
	// frontend will process in parallel for TSDB queries.
	TSDBMaxQueryParallelism(context.Context, string) int
	RequiredLabels(context.Context, string) []string
	RequiredNumberLabels(context.Context, string) int
	MaxQueryBytesRead(context.Context, string) int
	MaxQuerierBytesRead(context.Context, string) int
	MaxStatsCacheFreshness(context.Context, string) time.Duration
}

Limits extends the cortex limits interface with support for per tenant splitby parameters

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"`
}

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() int64

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() int64

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 int64, _ int64) queryrangebase.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 LokiLabelNamesRequest

type LokiLabelNamesRequest struct {
	StartTs time.Time `protobuf:"bytes,1,opt,name=startTs,proto3,stdtime" json:"startTs"`
	EndTs   time.Time `protobuf:"bytes,2,opt,name=endTs,proto3,stdtime" json:"endTs"`
	Path    string    `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	Query   string    `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"`
}

func (*LokiLabelNamesRequest) Descriptor

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

func (*LokiLabelNamesRequest) Equal

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

func (*LokiLabelNamesRequest) GetCachingOptions

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

func (*LokiLabelNamesRequest) GetEnd

func (r *LokiLabelNamesRequest) GetEnd() int64

func (*LokiLabelNamesRequest) GetEndTs

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

func (*LokiLabelNamesRequest) GetPath

func (m *LokiLabelNamesRequest) GetPath() string

func (*LokiLabelNamesRequest) GetQuery

func (m *LokiLabelNamesRequest) GetQuery() string

func (*LokiLabelNamesRequest) GetStart

func (r *LokiLabelNamesRequest) GetStart() int64

func (*LokiLabelNamesRequest) GetStartTs

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

func (*LokiLabelNamesRequest) GetStep

func (r *LokiLabelNamesRequest) GetStep() int64

func (*LokiLabelNamesRequest) GoString

func (this *LokiLabelNamesRequest) GoString() string

func (*LokiLabelNamesRequest) LogToSpan

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

func (*LokiLabelNamesRequest) Marshal

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

func (*LokiLabelNamesRequest) MarshalTo

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

func (*LokiLabelNamesRequest) MarshalToSizedBuffer

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

func (*LokiLabelNamesRequest) ProtoMessage

func (*LokiLabelNamesRequest) ProtoMessage()

func (*LokiLabelNamesRequest) Reset

func (m *LokiLabelNamesRequest) Reset()

func (*LokiLabelNamesRequest) Size

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

func (*LokiLabelNamesRequest) String

func (this *LokiLabelNamesRequest) String() string

func (*LokiLabelNamesRequest) Unmarshal

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

func (*LokiLabelNamesRequest) WithQuery

func (*LokiLabelNamesRequest) WithStartEnd

func (r *LokiLabelNamesRequest) WithStartEnd(s int64, e int64) queryrangebase.Request

func (*LokiLabelNamesRequest) XXX_DiscardUnknown

func (m *LokiLabelNamesRequest) XXX_DiscardUnknown()

func (*LokiLabelNamesRequest) XXX_Marshal

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

func (*LokiLabelNamesRequest) XXX_Merge

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

func (*LokiLabelNamesRequest) XXX_Size

func (m *LokiLabelNamesRequest) XXX_Size() int

func (*LokiLabelNamesRequest) XXX_Unmarshal

func (m *LokiLabelNamesRequest) 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_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 161-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) 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) 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 (*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) 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) 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"`
}

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() int64

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() int64

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 int64, e int64) queryrangebase.Request

func (*LokiRequest) WithStartEndTime

func (r *LokiRequest) WithStartEndTime(s time.Time, e time.Time) *LokiRequest

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_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 161-byte string literal not displayed */
}

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) 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) 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() int64

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() int64

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 int64, e int64) queryrangebase.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_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `` /* 161-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) 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) 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 MiddlewareMapperMetrics

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

func NewMiddlewareMapperMetrics

func NewMiddlewareMapperMetrics(registerer prometheus.Registerer) *MiddlewareMapperMetrics

type PrometheusExtractor

type PrometheusExtractor struct{}

PrometheusExtractor implements Extractor interface

func (PrometheusExtractor) Extract

func (PrometheusExtractor) Extract(start, end int64, res queryrangebase.Response, resStart, resEnd int64) queryrangebase.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 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 SplitByMetrics

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

func NewSplitByMetrics

func NewSplitByMetrics(r prometheus.Registerer) *SplitByMetrics

type Splitter

type Splitter func(req queryrangebase.Request, interval time.Duration) ([]queryrangebase.Request, error)

type Stopper

type Stopper interface {
	Stop()
}

Stopper gracefully shutdown resources created

func NewTripperware

func NewTripperware(
	cfg Config,
	engineOpts logql.EngineOpts,
	log log.Logger,
	limits Limits,
	schema config.SchemaConfig,
	cacheGenNumLoader queryrangebase.CacheGenNumberLoader,
	retentionEnabled bool,
	registerer prometheus.Registerer,
) (queryrangebase.Tripperware, Stopper, error)

NewTripperware returns a Tripperware 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 UserIDTransformer

type UserIDTransformer func(context.Context, string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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