queryfrontend

package
v0.15.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewThanosCodec

func NewThanosCodec(partialResponse bool) *codec

func NewTripperWare

func NewTripperWare(
	limits queryrange.Limits,
	cacheConfig *queryrange.ResultsCacheConfig,
	codec queryrange.Codec,
	cacheExtractor queryrange.Extractor,
	splitQueryInterval time.Duration,
	maxRetries int,
	reg prometheus.Registerer,
	logger log.Logger,
) (frontend.Tripperware, error)

Types

type Limits

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

Limits implements the Limits interface in Cortex frontend https://github.com/cortexproject/cortex/blob/master/pkg/querier/queryrange/limits.go#L17.

func NewLimits

func NewLimits(
	maxQueryParallelism int,
	maxQueryLength time.Duration,
	maxCacheFreshness time.Duration,
) *Limits

func (*Limits) MaxCacheFreshness

func (l *Limits) MaxCacheFreshness(_ string) time.Duration

func (*Limits) MaxQueryLength

func (l *Limits) MaxQueryLength(_ string) time.Duration

func (*Limits) MaxQueryParallelism

func (l *Limits) MaxQueryParallelism(_ string) int

type ThanosRequest

type ThanosRequest struct {
	Path                string
	Start               int64
	End                 int64
	Step                int64
	Timeout             time.Duration
	Query               string
	Dedup               bool
	PartialResponse     bool
	AutoDownsampling    bool
	MaxSourceResolution int64
	ReplicaLabels       []string
	StoreMatchers       [][]storepb.LabelMatcher
}

func (*ThanosRequest) GetEnd

func (r *ThanosRequest) GetEnd() int64

GetEnd returns the end timestamp of the request in milliseconds.

func (*ThanosRequest) GetQuery

func (r *ThanosRequest) GetQuery() string

GetQuery returns the query of the request.

func (*ThanosRequest) GetStart

func (r *ThanosRequest) GetStart() int64

GetStart returns the start timestamp of the request in milliseconds.

func (*ThanosRequest) GetStep

func (r *ThanosRequest) GetStep() int64

GetStep returns the step of the request in milliseconds.

func (*ThanosRequest) LogToSpan

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

LogToSpan writes information about this request to an OpenTracing span.

func (*ThanosRequest) ProtoMessage

func (r *ThanosRequest) ProtoMessage()

ProtoMessage implements proto.Message interface required by queryrange.Request, which is not used in thanos.

func (*ThanosRequest) Reset

func (r *ThanosRequest) Reset()

Reset implements proto.Message interface required by queryrange.Request, which is not used in thanos.

func (*ThanosRequest) String

func (r *ThanosRequest) String() string

String implements proto.Message interface required by queryrange.Request, which is not used in thanos.

func (*ThanosRequest) WithQuery

func (r *ThanosRequest) WithQuery(query string) queryrange.Request

WithQuery clone the current request with a different query.

func (*ThanosRequest) WithStartEnd

func (r *ThanosRequest) WithStartEnd(start int64, end int64) queryrange.Request

WithStartEnd clone the current request with different start and end timestamp.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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