Documentation
¶
Index ¶
- Constants
- Variables
- func BodyBytes(res *http.Response, logger log.Logger) ([]byte, error)
- func BodyBytesFromHTTPGRPCResponse(res *httpgrpc.HTTPResponse, logger log.Logger) ([]byte, error)
- func EncodeTime(t int64) string
- func GetSource(r *http.Request) string
- func InjectVerticalShardSizeToContext(ctx context.Context, verticalShardSize int) context.Context
- func MarshalSampleHistogramPairJSON(ptr unsafe.Pointer, stream *jsoniter.Stream)
- func NewRoundTripper(next http.RoundTripper, codec Codec, headers []string, ...) http.RoundTripper
- func ParseResponseSizeHeader(header string) (int, bool, error)
- func PrometheusResponseQueryableSamplesStatsPerStepJsoniterDecode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func PrometheusResponseQueryableSamplesStatsPerStepJsoniterEncode(ptr unsafe.Pointer, stream *jsoniter.Stream)
- func SetQueryResponseStats(a *PrometheusResponse, queryStats *stats.QueryStats)
- func SetRequestHeaders(h http.Header, defaultCodecType CodecType, compression Compression)
- func SubQueryStepSizeCheck(query string, defaultSubQueryInterval time.Duration, maxStep int64) error
- func TestQueryShardQuery(t *testing.T, instantQueryCodec Codec, shardedPrometheusCodec Codec)
- func UnmarshalResponse(r *http.Response, buf []byte, resp *PrometheusResponse) error
- func UnmarshalSampleHistogramPairJSON(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func VerticalShardSizeFromContext(ctx context.Context) (int, bool)
- type Buffer
- type CachedResponse
- func (*CachedResponse) Descriptor() ([]byte, []int)
- func (this *CachedResponse) Equal(that interface{}) bool
- func (m *CachedResponse) GetExtents() []Extent
- func (m *CachedResponse) GetKey() string
- func (this *CachedResponse) GoString() string
- func (m *CachedResponse) Marshal() (dAtA []byte, err error)
- func (m *CachedResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CachedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CachedResponse) ProtoMessage()
- func (m *CachedResponse) Reset()
- func (m *CachedResponse) Size() (n int)
- func (this *CachedResponse) String() string
- func (m *CachedResponse) Unmarshal(dAtA []byte) error
- func (m *CachedResponse) XXX_DiscardUnknown()
- func (m *CachedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CachedResponse) XXX_Merge(src proto.Message)
- func (m *CachedResponse) XXX_Size() int
- func (m *CachedResponse) XXX_Unmarshal(b []byte) error
- type CachingOptions
- type Codec
- type CodecType
- type Compression
- type Extent
- func (*Extent) Descriptor() ([]byte, []int)
- func (this *Extent) Equal(that interface{}) bool
- func (m *Extent) GetEnd() int64
- func (m *Extent) GetResponse() *types.Any
- func (m *Extent) GetStart() int64
- func (m *Extent) GetTraceId() string
- func (this *Extent) GoString() string
- func (m *Extent) Marshal() (dAtA []byte, err error)
- func (m *Extent) MarshalTo(dAtA []byte) (int, error)
- func (m *Extent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Extent) ProtoMessage()
- func (m *Extent) Reset()
- func (m *Extent) Size() (n int)
- func (this *Extent) String() string
- func (m *Extent) Unmarshal(dAtA []byte) error
- func (m *Extent) XXX_DiscardUnknown()
- func (m *Extent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Extent) XXX_Merge(src proto.Message)
- func (m *Extent) XXX_Size() int
- func (m *Extent) XXX_Unmarshal(b []byte) error
- type Handler
- type HandlerFunc
- type HistogramBucket
- func (*HistogramBucket) Descriptor() ([]byte, []int)
- func (this *HistogramBucket) Equal(that interface{}) bool
- func (m *HistogramBucket) GetBoundaries() int32
- func (m *HistogramBucket) GetCount() float64
- func (m *HistogramBucket) GetLower() float64
- func (m *HistogramBucket) GetUpper() float64
- func (this *HistogramBucket) GoString() string
- func (m *HistogramBucket) Marshal() (dAtA []byte, err error)
- func (m *HistogramBucket) MarshalTo(dAtA []byte) (int, error)
- func (m *HistogramBucket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HistogramBucket) ProtoMessage()
- func (m *HistogramBucket) Reset()
- func (m *HistogramBucket) Size() (n int)
- func (this *HistogramBucket) String() string
- func (m *HistogramBucket) Unmarshal(dAtA []byte) error
- func (m *HistogramBucket) XXX_DiscardUnknown()
- func (m *HistogramBucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HistogramBucket) XXX_Merge(src proto.Message)
- func (m *HistogramBucket) XXX_Size() int
- func (m *HistogramBucket) XXX_Unmarshal(b []byte) error
- type InstrumentMiddlewareMetrics
- type Limits
- type Matrix
- func (*Matrix) Descriptor() ([]byte, []int)
- func (this *Matrix) Equal(that interface{}) bool
- func (m *Matrix) GetSampleStreams() []SampleStream
- func (this *Matrix) GoString() string
- func (m *Matrix) Marshal() (dAtA []byte, err error)
- func (m *Matrix) MarshalTo(dAtA []byte) (int, error)
- func (m *Matrix) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Matrix) ProtoMessage()
- func (m *Matrix) Reset()
- func (m *Matrix) Size() (n int)
- func (this *Matrix) String() string
- func (m *Matrix) Unmarshal(dAtA []byte) error
- func (m *Matrix) XXX_DiscardUnknown()
- func (m *Matrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Matrix) XXX_Merge(src proto.Message)
- func (m *Matrix) XXX_Size() int
- func (m *Matrix) XXX_Unmarshal(b []byte) error
- type Merger
- type Middleware
- func DistributedQueryMiddleware(defaultEvaluationInterval time.Duration, lookbackDelta time.Duration, ...) Middleware
- func InstrumentMiddleware(name string, metrics *InstrumentMiddlewareMetrics) Middleware
- func MergeMiddlewares(middleware ...Middleware) Middleware
- func ShardByMiddleware(logger log.Logger, limits Limits, merger Merger, ...) Middleware
- type MiddlewareFunc
- type NoopCollector
- type PrometheusData
- func (*PrometheusData) Descriptor() ([]byte, []int)
- func (this *PrometheusData) Equal(that interface{}) bool
- func (m *PrometheusData) GetResult() PrometheusQueryResult
- func (m *PrometheusData) GetResultType() string
- func (m *PrometheusData) GetStats() *PrometheusResponseStats
- func (this *PrometheusData) GoString() string
- func (m *PrometheusData) Marshal() (dAtA []byte, err error)
- func (s *PrometheusData) MarshalJSON() ([]byte, error)
- func (m *PrometheusData) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusData) ProtoMessage()
- func (m *PrometheusData) Reset()
- func (m *PrometheusData) Size() (n int)
- func (this *PrometheusData) String() string
- func (m *PrometheusData) Unmarshal(dAtA []byte) error
- func (s *PrometheusData) UnmarshalJSON(data []byte) error
- func (m *PrometheusData) XXX_DiscardUnknown()
- func (m *PrometheusData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusData) XXX_Merge(src proto.Message)
- func (m *PrometheusData) XXX_Size() int
- func (m *PrometheusData) XXX_Unmarshal(b []byte) error
- type PrometheusQueryResult
- func (*PrometheusQueryResult) Descriptor() ([]byte, []int)
- func (this *PrometheusQueryResult) Equal(that interface{}) bool
- func (m *PrometheusQueryResult) GetMatrix() *Matrix
- func (m *PrometheusQueryResult) GetRawBytes() []byte
- func (m *PrometheusQueryResult) GetResult() isPrometheusQueryResult_Result
- func (m *PrometheusQueryResult) GetVector() *Vector
- func (this *PrometheusQueryResult) GoString() string
- func (m *PrometheusQueryResult) Marshal() (dAtA []byte, err error)
- func (m *PrometheusQueryResult) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusQueryResult) ProtoMessage()
- func (m *PrometheusQueryResult) Reset()
- func (m *PrometheusQueryResult) Size() (n int)
- func (this *PrometheusQueryResult) String() string
- func (m *PrometheusQueryResult) Unmarshal(dAtA []byte) error
- func (m *PrometheusQueryResult) XXX_DiscardUnknown()
- func (m *PrometheusQueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusQueryResult) XXX_Merge(src proto.Message)
- func (*PrometheusQueryResult) XXX_OneofWrappers() []interface{}
- func (m *PrometheusQueryResult) XXX_Size() int
- func (m *PrometheusQueryResult) XXX_Unmarshal(b []byte) error
- type PrometheusQueryResult_Matrix
- func (this *PrometheusQueryResult_Matrix) Equal(that interface{}) bool
- func (this *PrometheusQueryResult_Matrix) GoString() string
- func (m *PrometheusQueryResult_Matrix) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult_Matrix) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult_Matrix) Size() (n int)
- func (this *PrometheusQueryResult_Matrix) String() string
- type PrometheusQueryResult_RawBytes
- func (this *PrometheusQueryResult_RawBytes) Equal(that interface{}) bool
- func (this *PrometheusQueryResult_RawBytes) GoString() string
- func (m *PrometheusQueryResult_RawBytes) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult_RawBytes) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult_RawBytes) Size() (n int)
- func (this *PrometheusQueryResult_RawBytes) String() string
- type PrometheusQueryResult_Vector
- func (this *PrometheusQueryResult_Vector) Equal(that interface{}) bool
- func (this *PrometheusQueryResult_Vector) GoString() string
- func (m *PrometheusQueryResult_Vector) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult_Vector) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *PrometheusQueryResult_Vector) Size() (n int)
- func (this *PrometheusQueryResult_Vector) String() string
- type PrometheusRequest
- func (m *PrometheusRequest) GetCachingOptions() CachingOptions
- func (m *PrometheusRequest) GetEnd() int64
- func (m *PrometheusRequest) GetHeaders() http.Header
- func (m *PrometheusRequest) GetLogicalPlan() logicalplan.Plan
- func (m *PrometheusRequest) GetPath() string
- func (m *PrometheusRequest) GetQuery() string
- func (m *PrometheusRequest) GetStart() int64
- func (m *PrometheusRequest) GetStats() string
- func (m *PrometheusRequest) GetStep() int64
- func (m *PrometheusRequest) GetTimeout() time.Duration
- func (m *PrometheusRequest) LogToSpan(sp opentracing.Span)
- func (m *PrometheusRequest) WithQuery(query string) Request
- func (m *PrometheusRequest) WithStartEnd(start int64, end int64) Request
- func (m *PrometheusRequest) WithStats(stats string) Request
- type PrometheusResponse
- func (*PrometheusResponse) Descriptor() ([]byte, []int)
- func (this *PrometheusResponse) Equal(that interface{}) bool
- func (m *PrometheusResponse) GetData() PrometheusData
- func (m *PrometheusResponse) GetError() string
- func (m *PrometheusResponse) GetErrorType() string
- func (m *PrometheusResponse) GetHeaders() []*PrometheusResponseHeader
- func (m *PrometheusResponse) GetInfos() []string
- func (m *PrometheusResponse) GetStatus() string
- func (m *PrometheusResponse) GetWarnings() []string
- func (this *PrometheusResponse) GoString() string
- func (resp *PrometheusResponse) HTTPHeaders() map[string][]string
- func (m *PrometheusResponse) Marshal() (dAtA []byte, err error)
- func (m *PrometheusResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusResponse) ProtoMessage()
- func (m *PrometheusResponse) Reset()
- func (m *PrometheusResponse) Size() (n int)
- func (this *PrometheusResponse) String() string
- func (m *PrometheusResponse) Unmarshal(dAtA []byte) error
- func (m *PrometheusResponse) XXX_DiscardUnknown()
- func (m *PrometheusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusResponse) XXX_Merge(src proto.Message)
- func (m *PrometheusResponse) XXX_Size() int
- func (m *PrometheusResponse) XXX_Unmarshal(b []byte) error
- type PrometheusResponseHeader
- func (*PrometheusResponseHeader) Descriptor() ([]byte, []int)
- func (this *PrometheusResponseHeader) Equal(that interface{}) bool
- func (m *PrometheusResponseHeader) GetName() string
- func (m *PrometheusResponseHeader) GetValues() []string
- func (this *PrometheusResponseHeader) GoString() string
- func (m *PrometheusResponseHeader) Marshal() (dAtA []byte, err error)
- func (m *PrometheusResponseHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusResponseHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusResponseHeader) ProtoMessage()
- func (m *PrometheusResponseHeader) Reset()
- func (m *PrometheusResponseHeader) Size() (n int)
- func (this *PrometheusResponseHeader) String() string
- func (m *PrometheusResponseHeader) Unmarshal(dAtA []byte) error
- func (m *PrometheusResponseHeader) XXX_DiscardUnknown()
- func (m *PrometheusResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusResponseHeader) XXX_Merge(src proto.Message)
- func (m *PrometheusResponseHeader) XXX_Size() int
- func (m *PrometheusResponseHeader) XXX_Unmarshal(b []byte) error
- type PrometheusResponseQueryableSamplesStatsPerStep
- func (*PrometheusResponseQueryableSamplesStatsPerStep) Descriptor() ([]byte, []int)
- func (this *PrometheusResponseQueryableSamplesStatsPerStep) Equal(that interface{}) bool
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) GetTimestampMs() int64
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) GetValue() int64
- func (this *PrometheusResponseQueryableSamplesStatsPerStep) GoString() string
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) Marshal() (dAtA []byte, err error)
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusResponseQueryableSamplesStatsPerStep) ProtoMessage()
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) Reset()
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) Size() (n int)
- func (this *PrometheusResponseQueryableSamplesStatsPerStep) String() string
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) Unmarshal(dAtA []byte) error
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_DiscardUnknown()
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Merge(src proto.Message)
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Size() int
- func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Unmarshal(b []byte) error
- type PrometheusResponseSamplesStats
- func (*PrometheusResponseSamplesStats) Descriptor() ([]byte, []int)
- func (this *PrometheusResponseSamplesStats) Equal(that interface{}) bool
- func (m *PrometheusResponseSamplesStats) GetPeakSamples() int64
- func (m *PrometheusResponseSamplesStats) GetTotalQueryableSamples() int64
- func (m *PrometheusResponseSamplesStats) GetTotalQueryableSamplesPerStep() []*PrometheusResponseQueryableSamplesStatsPerStep
- func (this *PrometheusResponseSamplesStats) GoString() string
- func (m *PrometheusResponseSamplesStats) Marshal() (dAtA []byte, err error)
- func (m *PrometheusResponseSamplesStats) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusResponseSamplesStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusResponseSamplesStats) ProtoMessage()
- func (m *PrometheusResponseSamplesStats) Reset()
- func (m *PrometheusResponseSamplesStats) Size() (n int)
- func (this *PrometheusResponseSamplesStats) String() string
- func (m *PrometheusResponseSamplesStats) Unmarshal(dAtA []byte) error
- func (m *PrometheusResponseSamplesStats) XXX_DiscardUnknown()
- func (m *PrometheusResponseSamplesStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusResponseSamplesStats) XXX_Merge(src proto.Message)
- func (m *PrometheusResponseSamplesStats) XXX_Size() int
- func (m *PrometheusResponseSamplesStats) XXX_Unmarshal(b []byte) error
- type PrometheusResponseStats
- func (*PrometheusResponseStats) Descriptor() ([]byte, []int)
- func (this *PrometheusResponseStats) Equal(that interface{}) bool
- func (m *PrometheusResponseStats) GetSamples() *PrometheusResponseSamplesStats
- func (this *PrometheusResponseStats) GoString() string
- func (m *PrometheusResponseStats) Marshal() (dAtA []byte, err error)
- func (s *PrometheusResponseStats) MarshalJSON() ([]byte, error)
- func (m *PrometheusResponseStats) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusResponseStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusResponseStats) ProtoMessage()
- func (m *PrometheusResponseStats) Reset()
- func (m *PrometheusResponseStats) Size() (n int)
- func (this *PrometheusResponseStats) String() string
- func (m *PrometheusResponseStats) Unmarshal(dAtA []byte) error
- func (m *PrometheusResponseStats) XXX_DiscardUnknown()
- func (m *PrometheusResponseStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusResponseStats) XXX_Merge(src proto.Message)
- func (m *PrometheusResponseStats) XXX_Size() int
- func (m *PrometheusResponseStats) XXX_Unmarshal(b []byte) error
- type Request
- type RequestResponse
- type Response
- type RoundTripFunc
- type Sample
- func (*Sample) Descriptor() ([]byte, []int)
- func (this *Sample) Equal(that interface{}) bool
- func (m *Sample) GetHistogram() *SampleHistogramPair
- func (m *Sample) GetRawHistogram() *cortexpb.Histogram
- func (m *Sample) GetSample() *cortexpb.Sample
- func (m *Sample) GetTimestampMs() int64
- func (this *Sample) GoString() string
- func (m *Sample) Marshal() (dAtA []byte, err error)
- func (m *Sample) MarshalTo(dAtA []byte) (int, error)
- func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Sample) ProtoMessage()
- func (m *Sample) Reset()
- func (m *Sample) Size() (n int)
- func (this *Sample) String() string
- func (m *Sample) Unmarshal(dAtA []byte) error
- func (m *Sample) XXX_DiscardUnknown()
- func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Sample) XXX_Merge(src proto.Message)
- func (m *Sample) XXX_Size() int
- func (m *Sample) XXX_Unmarshal(b []byte) error
- type SampleHistogram
- func (*SampleHistogram) Descriptor() ([]byte, []int)
- func (this *SampleHistogram) Equal(that interface{}) bool
- func (m *SampleHistogram) GetBuckets() []*HistogramBucket
- func (m *SampleHistogram) GetCount() float64
- func (m *SampleHistogram) GetSum() float64
- func (this *SampleHistogram) GoString() string
- func (m *SampleHistogram) Marshal() (dAtA []byte, err error)
- func (m *SampleHistogram) MarshalTo(dAtA []byte) (int, error)
- func (m *SampleHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SampleHistogram) ProtoMessage()
- func (m *SampleHistogram) Reset()
- func (m *SampleHistogram) Size() (n int)
- func (this *SampleHistogram) String() string
- func (m *SampleHistogram) Unmarshal(dAtA []byte) error
- func (m *SampleHistogram) XXX_DiscardUnknown()
- func (m *SampleHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SampleHistogram) XXX_Merge(src proto.Message)
- func (m *SampleHistogram) XXX_Size() int
- func (m *SampleHistogram) XXX_Unmarshal(b []byte) error
- type SampleHistogramPair
- func (*SampleHistogramPair) Descriptor() ([]byte, []int)
- func (this *SampleHistogramPair) Equal(that interface{}) bool
- func (m *SampleHistogramPair) GetHistogram() SampleHistogram
- func (m *SampleHistogramPair) GetTimestampMs() int64
- func (this *SampleHistogramPair) GoString() string
- func (m *SampleHistogramPair) Marshal() (dAtA []byte, err error)
- func (m *SampleHistogramPair) MarshalTo(dAtA []byte) (int, error)
- func (m *SampleHistogramPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SampleHistogramPair) ProtoMessage()
- func (m *SampleHistogramPair) Reset()
- func (m *SampleHistogramPair) Size() (n int)
- func (this *SampleHistogramPair) String() string
- func (m *SampleHistogramPair) Unmarshal(dAtA []byte) error
- func (m *SampleHistogramPair) XXX_DiscardUnknown()
- func (m *SampleHistogramPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SampleHistogramPair) XXX_Merge(src proto.Message)
- func (m *SampleHistogramPair) XXX_Size() int
- func (m *SampleHistogramPair) XXX_Unmarshal(b []byte) error
- type SampleStream
- func (*SampleStream) Descriptor() ([]byte, []int)
- func (this *SampleStream) Equal(that interface{}) bool
- func (m *SampleStream) GetHistograms() []SampleHistogramPair
- func (m *SampleStream) GetSamples() []cortexpb.Sample
- func (this *SampleStream) GoString() string
- func (m *SampleStream) Marshal() (dAtA []byte, err error)
- func (m *SampleStream) MarshalTo(dAtA []byte) (int, error)
- func (m *SampleStream) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SampleStream) ProtoMessage()
- func (m *SampleStream) Reset()
- func (m *SampleStream) Size() (n int)
- func (this *SampleStream) String() string
- func (m *SampleStream) Unmarshal(dAtA []byte) error
- func (m *SampleStream) XXX_DiscardUnknown()
- func (m *SampleStream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SampleStream) XXX_Merge(src proto.Message)
- func (m *SampleStream) XXX_Size() int
- func (m *SampleStream) XXX_Unmarshal(b []byte) error
- type Tripperware
- type Vector
- func (*Vector) Descriptor() ([]byte, []int)
- func (this *Vector) Equal(that interface{}) bool
- func (m *Vector) GetSamples() []Sample
- func (this *Vector) GoString() string
- func (m *Vector) Marshal() (dAtA []byte, err error)
- func (m *Vector) MarshalTo(dAtA []byte) (int, error)
- func (m *Vector) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Vector) ProtoMessage()
- func (m *Vector) Reset()
- func (m *Vector) Size() (n int)
- func (this *Vector) String() string
- func (m *Vector) Unmarshal(dAtA []byte) error
- func (m *Vector) XXX_DiscardUnknown()
- func (m *Vector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Vector) XXX_Merge(src proto.Message)
- func (m *Vector) XXX_Size() int
- func (m *Vector) XXX_Unmarshal(b []byte) error
Constants ¶
const ( GzipCompression Compression = "gzip" ZstdCompression Compression = "zstd" SnappyCompression Compression = "snappy" NonCompression Compression = "" JsonCodecType CodecType = "json" ProtobufCodecType CodecType = "protobuf" ApplicationProtobuf string = "application/x-protobuf" ApplicationJson string = "application/json" QueryResponseCortexMIMEType = "application/" + QueryResponseCortexMIMESubType QueryResponseCortexMIMESubType = "x-cortex-query+proto" RulerUserAgent = "CortexRuler" )
const (
MaxStep = 11000
)
const QueryRejectErrorMessage = "This query does not perform well and has been rejected by the service operator."
const StatusSuccess = "success"
Variables ¶
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") )
var (
ErrSubQueryStepTooSmall = "exceeded maximum resolution of %d points per timeseries in subquery. Try increasing the step size of your subquery"
)
Functions ¶
func BodyBytesFromHTTPGRPCResponse ¶ added in v1.20.0
func EncodeTime ¶
func InjectVerticalShardSizeToContext ¶ added in v1.20.0
func MarshalSampleHistogramPairJSON ¶ added in v1.18.0
Adapted from https://github.com/prometheus/client_golang/blob/4b158abea9470f75b6f07460cdc2189b91914562/api/prometheus/v1/api.go#L137.
func NewRoundTripper ¶
func NewRoundTripper(next http.RoundTripper, codec Codec, headers []string, middlewares ...Middleware) http.RoundTripper
NewRoundTripper merges a set of middlewares into an handler, then inject it into the `next` roundtripper using the codec to translate requests and responses.
func ParseResponseSizeHeader ¶ added in v1.20.0
func SetQueryResponseStats ¶ added in v1.19.0
func SetQueryResponseStats(a *PrometheusResponse, queryStats *stats.QueryStats)
func SetRequestHeaders ¶ added in v1.19.0
func SetRequestHeaders(h http.Header, defaultCodecType CodecType, compression Compression)
func SubQueryStepSizeCheck ¶ added in v1.16.0
func SubQueryStepSizeCheck(query string, defaultSubQueryInterval time.Duration, maxStep int64) error
SubQueryStepSizeCheck ensures the query doesn't contain too small step size in subqueries.
func TestQueryShardQuery ¶
func UnmarshalResponse ¶ added in v1.19.0
func UnmarshalResponse(r *http.Response, buf []byte, resp *PrometheusResponse) error
func UnmarshalSampleHistogramPairJSON ¶ added in v1.18.0
Adapted from https://github.com/prometheus/client_golang/blob/4b158abea9470f75b6f07460cdc2189b91914562/api/prometheus/v1/api.go#L84.
Types ¶
type Buffer ¶
type Buffer interface {
Bytes() []byte
}
Buffer can be used to read a response body. This allows to avoid reading the body multiple times from the `http.Response.Body`.
type CachedResponse ¶ added in v1.19.0
type CachedResponse struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
// List of cached responses; non-overlapping and in order.
Extents []Extent `protobuf:"bytes,2,rep,name=extents,proto3" json:"extents"`
}
func (*CachedResponse) Descriptor ¶ added in v1.19.0
func (*CachedResponse) Descriptor() ([]byte, []int)
func (*CachedResponse) Equal ¶ added in v1.19.0
func (this *CachedResponse) Equal(that interface{}) bool
func (*CachedResponse) GetExtents ¶ added in v1.19.0
func (m *CachedResponse) GetExtents() []Extent
func (*CachedResponse) GetKey ¶ added in v1.19.0
func (m *CachedResponse) GetKey() string
func (*CachedResponse) GoString ¶ added in v1.19.0
func (this *CachedResponse) GoString() string
func (*CachedResponse) Marshal ¶ added in v1.19.0
func (m *CachedResponse) Marshal() (dAtA []byte, err error)
func (*CachedResponse) MarshalTo ¶ added in v1.19.0
func (m *CachedResponse) MarshalTo(dAtA []byte) (int, error)
func (*CachedResponse) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *CachedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CachedResponse) ProtoMessage ¶ added in v1.19.0
func (*CachedResponse) ProtoMessage()
func (*CachedResponse) Reset ¶ added in v1.19.0
func (m *CachedResponse) Reset()
func (*CachedResponse) Size ¶ added in v1.19.0
func (m *CachedResponse) Size() (n int)
func (*CachedResponse) String ¶ added in v1.19.0
func (this *CachedResponse) String() string
func (*CachedResponse) Unmarshal ¶ added in v1.19.0
func (m *CachedResponse) Unmarshal(dAtA []byte) error
func (*CachedResponse) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *CachedResponse) XXX_DiscardUnknown()
func (*CachedResponse) XXX_Marshal ¶ added in v1.19.0
func (m *CachedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CachedResponse) XXX_Merge ¶ added in v1.19.0
func (m *CachedResponse) XXX_Merge(src proto.Message)
func (*CachedResponse) XXX_Size ¶ added in v1.19.0
func (m *CachedResponse) XXX_Size() int
func (*CachedResponse) XXX_Unmarshal ¶ added in v1.19.0
func (m *CachedResponse) XXX_Unmarshal(b []byte) error
type CachingOptions ¶ added in v1.19.0
type CachingOptions struct {
Disabled bool
}
type Codec ¶
type Codec interface {
Merger
// DecodeRequest decodes a Request from an http request.
DecodeRequest(_ context.Context, request *http.Request, forwardHeaders []string) (Request, error)
// DecodeResponse decodes a Response from an http response.
// The original request is also passed as a parameter this is useful for implementation that needs the request
// to merge result or build the result correctly.
DecodeResponse(context.Context, *http.Response, Request) (Response, error)
// EncodeRequest encodes a Request into an http request.
EncodeRequest(context.Context, Request) (*http.Request, error)
// EncodeResponse encodes a Response into an http response.
EncodeResponse(context.Context, *http.Request, Response) (*http.Response, error)
}
Codec is used to encode/decode query range requests and responses so they can be passed down to middlewares.
type Compression ¶ added in v1.19.0
type Compression string
type Extent ¶ added in v1.19.0
type Extent struct {
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
TraceId string `protobuf:"bytes,4,opt,name=trace_id,json=traceId,proto3" json:"-"`
Response *types.Any `protobuf:"bytes,5,opt,name=response,proto3" json:"response"`
}
func (*Extent) Descriptor ¶ added in v1.19.0
func (*Extent) GetResponse ¶ added in v1.19.0
func (*Extent) GetTraceId ¶ added in v1.19.0
func (*Extent) MarshalToSizedBuffer ¶ added in v1.19.0
func (*Extent) ProtoMessage ¶ added in v1.19.0
func (*Extent) ProtoMessage()
func (*Extent) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *Extent) XXX_DiscardUnknown()
func (*Extent) XXX_Marshal ¶ added in v1.19.0
func (*Extent) XXX_Unmarshal ¶ added in v1.19.0
type HandlerFunc ¶
HandlerFunc is like http.HandlerFunc, but for Handler.
type HistogramBucket ¶ added in v1.18.0
type HistogramBucket struct {
Boundaries int32 `protobuf:"varint,1,opt,name=boundaries,proto3" json:"boundaries,omitempty"`
Lower float64 `protobuf:"fixed64,2,opt,name=lower,proto3" json:"lower,omitempty"`
Upper float64 `protobuf:"fixed64,3,opt,name=upper,proto3" json:"upper,omitempty"`
Count float64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (*HistogramBucket) Descriptor ¶ added in v1.18.0
func (*HistogramBucket) Descriptor() ([]byte, []int)
func (*HistogramBucket) Equal ¶ added in v1.18.0
func (this *HistogramBucket) Equal(that interface{}) bool
func (*HistogramBucket) GetBoundaries ¶ added in v1.18.0
func (m *HistogramBucket) GetBoundaries() int32
func (*HistogramBucket) GetCount ¶ added in v1.18.0
func (m *HistogramBucket) GetCount() float64
func (*HistogramBucket) GetLower ¶ added in v1.18.0
func (m *HistogramBucket) GetLower() float64
func (*HistogramBucket) GetUpper ¶ added in v1.18.0
func (m *HistogramBucket) GetUpper() float64
func (*HistogramBucket) GoString ¶ added in v1.18.0
func (this *HistogramBucket) GoString() string
func (*HistogramBucket) Marshal ¶ added in v1.18.0
func (m *HistogramBucket) Marshal() (dAtA []byte, err error)
func (*HistogramBucket) MarshalTo ¶ added in v1.18.0
func (m *HistogramBucket) MarshalTo(dAtA []byte) (int, error)
func (*HistogramBucket) MarshalToSizedBuffer ¶ added in v1.18.0
func (m *HistogramBucket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HistogramBucket) ProtoMessage ¶ added in v1.18.0
func (*HistogramBucket) ProtoMessage()
func (*HistogramBucket) Reset ¶ added in v1.18.0
func (m *HistogramBucket) Reset()
func (*HistogramBucket) Size ¶ added in v1.18.0
func (m *HistogramBucket) Size() (n int)
func (*HistogramBucket) String ¶ added in v1.18.0
func (this *HistogramBucket) String() string
func (*HistogramBucket) Unmarshal ¶ added in v1.18.0
func (m *HistogramBucket) Unmarshal(dAtA []byte) error
func (*HistogramBucket) XXX_DiscardUnknown ¶ added in v1.18.0
func (m *HistogramBucket) XXX_DiscardUnknown()
func (*HistogramBucket) XXX_Marshal ¶ added in v1.18.0
func (m *HistogramBucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HistogramBucket) XXX_Merge ¶ added in v1.18.0
func (m *HistogramBucket) XXX_Merge(src proto.Message)
func (*HistogramBucket) XXX_Size ¶ added in v1.18.0
func (m *HistogramBucket) XXX_Size() int
func (*HistogramBucket) XXX_Unmarshal ¶ added in v1.18.0
func (m *HistogramBucket) XXX_Unmarshal(b []byte) error
type InstrumentMiddlewareMetrics ¶
type InstrumentMiddlewareMetrics struct {
// contains filtered or unexported fields
}
InstrumentMiddlewareMetrics holds the metrics tracked by InstrumentMiddleware.
func NewInstrumentMiddlewareMetrics ¶
func NewInstrumentMiddlewareMetrics(registerer prometheus.Registerer) *InstrumentMiddlewareMetrics
NewInstrumentMiddlewareMetrics makes a new InstrumentMiddlewareMetrics.
type Limits ¶
type Limits interface {
// MaxQueryLookback returns the max lookback period of queries.
MaxQueryLookback(userID string) time.Duration
// MaxQueryLength returns the limit of the length (in time) of a query.
MaxQueryLength(string) time.Duration
// MaxQueryParallelism returns the limit to the number of split queries the
// frontend will process in parallel.
MaxQueryParallelism(string) int
// MaxQueryResponseSize returns the max total response size of a query in bytes.
MaxQueryResponseSize(string) int64
// MaxCacheFreshness returns the period after which results are cacheable,
// to prevent caching of very recent results.
MaxCacheFreshness(string) time.Duration
// QueryVerticalShardSize returns the maximum number of queriers that can handle requests for this user.
QueryVerticalShardSize(userID string) int
// QueryPriority returns the query priority config for the tenant, including different priorities and their attributes.
QueryPriority(userID string) validation.QueryPriority
QueryRejection(userID string) validation.QueryRejection
}
Limits allows us to specify per-tenant runtime limits on the behavior of the query handling code.
type Matrix ¶ added in v1.19.0
type Matrix struct {
SampleStreams []SampleStream `protobuf:"bytes,1,rep,name=sampleStreams,proto3" json:"sampleStreams"`
}
func (*Matrix) Descriptor ¶ added in v1.19.0
func (*Matrix) GetSampleStreams ¶ added in v1.19.0
func (m *Matrix) GetSampleStreams() []SampleStream
func (*Matrix) MarshalToSizedBuffer ¶ added in v1.19.0
func (*Matrix) ProtoMessage ¶ added in v1.19.0
func (*Matrix) ProtoMessage()
func (*Matrix) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *Matrix) XXX_DiscardUnknown()
func (*Matrix) XXX_Marshal ¶ added in v1.19.0
func (*Matrix) XXX_Unmarshal ¶ added in v1.19.0
type Merger ¶
type Merger interface {
// MergeResponse merges responses from multiple requests into a single Response
MergeResponse(context.Context, Request, ...Response) (Response, error)
}
Merger is used by middlewares making multiple requests to merge back all responses into a single one.
type Middleware ¶
Middleware is a higher order Handler.
func DistributedQueryMiddleware ¶ added in v1.20.0
func DistributedQueryMiddleware(defaultEvaluationInterval time.Duration, lookbackDelta time.Duration, optimizers []logicalplan.Optimizer) Middleware
func InstrumentMiddleware ¶
func InstrumentMiddleware(name string, metrics *InstrumentMiddlewareMetrics) Middleware
InstrumentMiddleware can be inserted into the middleware chain to expose timing information.
func MergeMiddlewares ¶
func MergeMiddlewares(middleware ...Middleware) Middleware
MergeMiddlewares produces a middleware that applies multiple middleware in turn; ie Merge(f,g,h).Wrap(handler) == f.Wrap(g.Wrap(h.Wrap(handler)))
func ShardByMiddleware ¶
func ShardByMiddleware(logger log.Logger, limits Limits, merger Merger, queryAnalyzer querysharding.Analyzer) Middleware
type MiddlewareFunc ¶
MiddlewareFunc is like http.HandlerFunc, but for Middleware.
func (MiddlewareFunc) Wrap ¶
func (q MiddlewareFunc) Wrap(h Handler) Handler
Wrap implements Middleware.
type NoopCollector ¶
type NoopCollector struct{}
NoopCollector is a noop collector that can be used as placeholder when no metric should tracked by the instrumentation.
func (*NoopCollector) Register ¶
func (c *NoopCollector) Register()
Register implements instrument.Collector.
type PrometheusData ¶ added in v1.19.0
type PrometheusData struct {
ResultType string `protobuf:"bytes,1,opt,name=ResultType,proto3" json:"resultType"`
Result PrometheusQueryResult `protobuf:"bytes,2,opt,name=Result,proto3" json:"result"`
Stats *PrometheusResponseStats `protobuf:"bytes,3,opt,name=stats,proto3" json:"stats,omitempty"`
}
func (*PrometheusData) Descriptor ¶ added in v1.19.0
func (*PrometheusData) Descriptor() ([]byte, []int)
func (*PrometheusData) Equal ¶ added in v1.19.0
func (this *PrometheusData) Equal(that interface{}) bool
func (*PrometheusData) GetResult ¶ added in v1.19.0
func (m *PrometheusData) GetResult() PrometheusQueryResult
func (*PrometheusData) GetResultType ¶ added in v1.19.0
func (m *PrometheusData) GetResultType() string
func (*PrometheusData) GetStats ¶ added in v1.19.0
func (m *PrometheusData) GetStats() *PrometheusResponseStats
func (*PrometheusData) GoString ¶ added in v1.19.0
func (this *PrometheusData) GoString() string
func (*PrometheusData) Marshal ¶ added in v1.19.0
func (m *PrometheusData) Marshal() (dAtA []byte, err error)
func (*PrometheusData) MarshalJSON ¶ added in v1.19.0
func (s *PrometheusData) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*PrometheusData) MarshalTo ¶ added in v1.19.0
func (m *PrometheusData) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusData) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *PrometheusData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusData) ProtoMessage ¶ added in v1.19.0
func (*PrometheusData) ProtoMessage()
func (*PrometheusData) Reset ¶ added in v1.19.0
func (m *PrometheusData) Reset()
func (*PrometheusData) Size ¶ added in v1.19.0
func (m *PrometheusData) Size() (n int)
func (*PrometheusData) String ¶ added in v1.19.0
func (this *PrometheusData) String() string
func (*PrometheusData) Unmarshal ¶ added in v1.19.0
func (m *PrometheusData) Unmarshal(dAtA []byte) error
func (*PrometheusData) UnmarshalJSON ¶ added in v1.19.0
func (s *PrometheusData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*PrometheusData) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *PrometheusData) XXX_DiscardUnknown()
func (*PrometheusData) XXX_Marshal ¶ added in v1.19.0
func (m *PrometheusData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusData) XXX_Merge ¶ added in v1.19.0
func (m *PrometheusData) XXX_Merge(src proto.Message)
func (*PrometheusData) XXX_Size ¶ added in v1.19.0
func (m *PrometheusData) XXX_Size() int
func (*PrometheusData) XXX_Unmarshal ¶ added in v1.19.0
func (m *PrometheusData) XXX_Unmarshal(b []byte) error
type PrometheusQueryResult ¶ added in v1.19.0
type PrometheusQueryResult struct {
// Types that are valid to be assigned to Result:
// *PrometheusQueryResult_Vector
// *PrometheusQueryResult_RawBytes
// *PrometheusQueryResult_Matrix
Result isPrometheusQueryResult_Result `protobuf_oneof:"result"`
}
func (*PrometheusQueryResult) Descriptor ¶ added in v1.19.0
func (*PrometheusQueryResult) Descriptor() ([]byte, []int)
func (*PrometheusQueryResult) Equal ¶ added in v1.19.0
func (this *PrometheusQueryResult) Equal(that interface{}) bool
func (*PrometheusQueryResult) GetMatrix ¶ added in v1.19.0
func (m *PrometheusQueryResult) GetMatrix() *Matrix
func (*PrometheusQueryResult) GetRawBytes ¶ added in v1.19.0
func (m *PrometheusQueryResult) GetRawBytes() []byte
func (*PrometheusQueryResult) GetResult ¶ added in v1.19.0
func (m *PrometheusQueryResult) GetResult() isPrometheusQueryResult_Result
func (*PrometheusQueryResult) GetVector ¶ added in v1.19.0
func (m *PrometheusQueryResult) GetVector() *Vector
func (*PrometheusQueryResult) GoString ¶ added in v1.19.0
func (this *PrometheusQueryResult) GoString() string
func (*PrometheusQueryResult) Marshal ¶ added in v1.19.0
func (m *PrometheusQueryResult) Marshal() (dAtA []byte, err error)
func (*PrometheusQueryResult) MarshalTo ¶ added in v1.19.0
func (m *PrometheusQueryResult) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusQueryResult) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *PrometheusQueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusQueryResult) ProtoMessage ¶ added in v1.19.0
func (*PrometheusQueryResult) ProtoMessage()
func (*PrometheusQueryResult) Reset ¶ added in v1.19.0
func (m *PrometheusQueryResult) Reset()
func (*PrometheusQueryResult) Size ¶ added in v1.19.0
func (m *PrometheusQueryResult) Size() (n int)
func (*PrometheusQueryResult) String ¶ added in v1.19.0
func (this *PrometheusQueryResult) String() string
func (*PrometheusQueryResult) Unmarshal ¶ added in v1.19.0
func (m *PrometheusQueryResult) Unmarshal(dAtA []byte) error
func (*PrometheusQueryResult) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *PrometheusQueryResult) XXX_DiscardUnknown()
func (*PrometheusQueryResult) XXX_Marshal ¶ added in v1.19.0
func (m *PrometheusQueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusQueryResult) XXX_Merge ¶ added in v1.19.0
func (m *PrometheusQueryResult) XXX_Merge(src proto.Message)
func (*PrometheusQueryResult) XXX_OneofWrappers ¶ added in v1.19.0
func (*PrometheusQueryResult) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*PrometheusQueryResult) XXX_Size ¶ added in v1.19.0
func (m *PrometheusQueryResult) XXX_Size() int
func (*PrometheusQueryResult) XXX_Unmarshal ¶ added in v1.19.0
func (m *PrometheusQueryResult) XXX_Unmarshal(b []byte) error
type PrometheusQueryResult_Matrix ¶ added in v1.19.0
type PrometheusQueryResult_Matrix struct {
Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3,oneof"`
}
func (*PrometheusQueryResult_Matrix) Equal ¶ added in v1.19.0
func (this *PrometheusQueryResult_Matrix) Equal(that interface{}) bool
func (*PrometheusQueryResult_Matrix) GoString ¶ added in v1.19.0
func (this *PrometheusQueryResult_Matrix) GoString() string
func (*PrometheusQueryResult_Matrix) MarshalTo ¶ added in v1.19.0
func (m *PrometheusQueryResult_Matrix) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusQueryResult_Matrix) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *PrometheusQueryResult_Matrix) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusQueryResult_Matrix) Size ¶ added in v1.19.0
func (m *PrometheusQueryResult_Matrix) Size() (n int)
func (*PrometheusQueryResult_Matrix) String ¶ added in v1.19.0
func (this *PrometheusQueryResult_Matrix) String() string
type PrometheusQueryResult_RawBytes ¶ added in v1.19.0
type PrometheusQueryResult_RawBytes struct {
RawBytes []byte `protobuf:"bytes,2,opt,name=rawBytes,proto3,oneof"`
}
func (*PrometheusQueryResult_RawBytes) Equal ¶ added in v1.19.0
func (this *PrometheusQueryResult_RawBytes) Equal(that interface{}) bool
func (*PrometheusQueryResult_RawBytes) GoString ¶ added in v1.19.0
func (this *PrometheusQueryResult_RawBytes) GoString() string
func (*PrometheusQueryResult_RawBytes) MarshalTo ¶ added in v1.19.0
func (m *PrometheusQueryResult_RawBytes) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusQueryResult_RawBytes) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *PrometheusQueryResult_RawBytes) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusQueryResult_RawBytes) Size ¶ added in v1.19.0
func (m *PrometheusQueryResult_RawBytes) Size() (n int)
func (*PrometheusQueryResult_RawBytes) String ¶ added in v1.19.0
func (this *PrometheusQueryResult_RawBytes) String() string
type PrometheusQueryResult_Vector ¶ added in v1.19.0
type PrometheusQueryResult_Vector struct {
Vector *Vector `protobuf:"bytes,1,opt,name=vector,proto3,oneof"`
}
func (*PrometheusQueryResult_Vector) Equal ¶ added in v1.19.0
func (this *PrometheusQueryResult_Vector) Equal(that interface{}) bool
func (*PrometheusQueryResult_Vector) GoString ¶ added in v1.19.0
func (this *PrometheusQueryResult_Vector) GoString() string
func (*PrometheusQueryResult_Vector) MarshalTo ¶ added in v1.19.0
func (m *PrometheusQueryResult_Vector) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusQueryResult_Vector) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *PrometheusQueryResult_Vector) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusQueryResult_Vector) Size ¶ added in v1.19.0
func (m *PrometheusQueryResult_Vector) Size() (n int)
func (*PrometheusQueryResult_Vector) String ¶ added in v1.19.0
func (this *PrometheusQueryResult_Vector) String() string
type PrometheusRequest ¶ added in v1.19.0
type PrometheusRequest struct {
Request
Time int64
Start int64
End int64
Step int64
Timeout time.Duration
Query string
Path string
Headers http.Header
Stats string
CachingOptions CachingOptions
LogicalPlan logicalplan.Plan
}
func (*PrometheusRequest) GetCachingOptions ¶ added in v1.19.0
func (m *PrometheusRequest) GetCachingOptions() CachingOptions
func (*PrometheusRequest) GetEnd ¶ added in v1.19.0
func (m *PrometheusRequest) GetEnd() int64
func (*PrometheusRequest) GetHeaders ¶ added in v1.19.0
func (m *PrometheusRequest) GetHeaders() http.Header
func (*PrometheusRequest) GetLogicalPlan ¶ added in v1.20.0
func (m *PrometheusRequest) GetLogicalPlan() logicalplan.Plan
func (*PrometheusRequest) GetPath ¶ added in v1.19.0
func (m *PrometheusRequest) GetPath() string
func (*PrometheusRequest) GetQuery ¶ added in v1.19.0
func (m *PrometheusRequest) GetQuery() string
func (*PrometheusRequest) GetStart ¶ added in v1.19.0
func (m *PrometheusRequest) GetStart() int64
func (*PrometheusRequest) GetStats ¶ added in v1.19.0
func (m *PrometheusRequest) GetStats() string
func (*PrometheusRequest) GetStep ¶ added in v1.19.0
func (m *PrometheusRequest) GetStep() int64
func (*PrometheusRequest) GetTimeout ¶ added in v1.19.0
func (m *PrometheusRequest) GetTimeout() time.Duration
func (*PrometheusRequest) LogToSpan ¶ added in v1.19.0
func (m *PrometheusRequest) LogToSpan(sp opentracing.Span)
LogToSpan logs the current `PrometheusRequest` parameters to the specified span.
func (*PrometheusRequest) WithQuery ¶ added in v1.19.0
func (m *PrometheusRequest) WithQuery(query string) Request
WithQuery clones the current `PrometheusRequest` with a new query.
func (*PrometheusRequest) WithStartEnd ¶ added in v1.19.0
func (m *PrometheusRequest) WithStartEnd(start int64, end int64) Request
WithStartEnd clones the current `PrometheusRequest` with a new `start` and `end` timestamp.
func (*PrometheusRequest) WithStats ¶ added in v1.19.0
func (m *PrometheusRequest) WithStats(stats string) Request
WithStats clones the current `PrometheusRequest` with a new stats.
type PrometheusResponse ¶ added in v1.19.0
type PrometheusResponse struct {
Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"`
Data PrometheusData `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"`
Headers []*PrometheusResponseHeader `protobuf:"bytes,5,rep,name=Headers,proto3" json:"-"`
Warnings []string `protobuf:"bytes,6,rep,name=Warnings,proto3" json:"warnings,omitempty"`
Infos []string `protobuf:"bytes,7,rep,name=Infos,proto3" json:"infos,omitempty"`
}
func NewEmptyPrometheusResponse ¶ added in v1.19.0
func NewEmptyPrometheusResponse(instant bool) *PrometheusResponse
NewEmptyPrometheusResponse returns an empty successful Prometheus query range response.
func (*PrometheusResponse) Descriptor ¶ added in v1.19.0
func (*PrometheusResponse) Descriptor() ([]byte, []int)
func (*PrometheusResponse) Equal ¶ added in v1.19.0
func (this *PrometheusResponse) Equal(that interface{}) bool
func (*PrometheusResponse) GetData ¶ added in v1.19.0
func (m *PrometheusResponse) GetData() PrometheusData
func (*PrometheusResponse) GetError ¶ added in v1.19.0
func (m *PrometheusResponse) GetError() string
func (*PrometheusResponse) GetErrorType ¶ added in v1.19.0
func (m *PrometheusResponse) GetErrorType() string
func (*PrometheusResponse) GetHeaders ¶ added in v1.19.0
func (m *PrometheusResponse) GetHeaders() []*PrometheusResponseHeader
func (*PrometheusResponse) GetInfos ¶ added in v1.19.0
func (m *PrometheusResponse) GetInfos() []string
func (*PrometheusResponse) GetStatus ¶ added in v1.19.0
func (m *PrometheusResponse) GetStatus() string
func (*PrometheusResponse) GetWarnings ¶ added in v1.19.0
func (m *PrometheusResponse) GetWarnings() []string
func (*PrometheusResponse) GoString ¶ added in v1.19.0
func (this *PrometheusResponse) GoString() string
func (*PrometheusResponse) HTTPHeaders ¶ added in v1.19.0
func (resp *PrometheusResponse) HTTPHeaders() map[string][]string
func (*PrometheusResponse) Marshal ¶ added in v1.19.0
func (m *PrometheusResponse) Marshal() (dAtA []byte, err error)
func (*PrometheusResponse) MarshalTo ¶ added in v1.19.0
func (m *PrometheusResponse) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusResponse) MarshalToSizedBuffer ¶ added in v1.19.0
func (m *PrometheusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusResponse) ProtoMessage ¶ added in v1.19.0
func (*PrometheusResponse) ProtoMessage()
func (*PrometheusResponse) Reset ¶ added in v1.19.0
func (m *PrometheusResponse) Reset()
func (*PrometheusResponse) Size ¶ added in v1.19.0
func (m *PrometheusResponse) Size() (n int)
func (*PrometheusResponse) String ¶ added in v1.19.0
func (this *PrometheusResponse) String() string
func (*PrometheusResponse) Unmarshal ¶ added in v1.19.0
func (m *PrometheusResponse) Unmarshal(dAtA []byte) error
func (*PrometheusResponse) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *PrometheusResponse) XXX_DiscardUnknown()
func (*PrometheusResponse) XXX_Marshal ¶ added in v1.19.0
func (m *PrometheusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusResponse) XXX_Merge ¶ added in v1.19.0
func (m *PrometheusResponse) XXX_Merge(src proto.Message)
func (*PrometheusResponse) XXX_Size ¶ added in v1.19.0
func (m *PrometheusResponse) XXX_Size() int
func (*PrometheusResponse) XXX_Unmarshal ¶ added in v1.19.0
func (m *PrometheusResponse) XXX_Unmarshal(b []byte) error
type PrometheusResponseHeader ¶
type PrometheusResponseHeader struct {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"-"`
Values []string `protobuf:"bytes,2,rep,name=Values,proto3" json:"-"`
}
func (*PrometheusResponseHeader) Descriptor ¶
func (*PrometheusResponseHeader) Descriptor() ([]byte, []int)
func (*PrometheusResponseHeader) Equal ¶
func (this *PrometheusResponseHeader) Equal(that interface{}) bool
func (*PrometheusResponseHeader) GetName ¶
func (m *PrometheusResponseHeader) GetName() string
func (*PrometheusResponseHeader) GetValues ¶
func (m *PrometheusResponseHeader) GetValues() []string
func (*PrometheusResponseHeader) GoString ¶
func (this *PrometheusResponseHeader) GoString() string
func (*PrometheusResponseHeader) Marshal ¶
func (m *PrometheusResponseHeader) Marshal() (dAtA []byte, err error)
func (*PrometheusResponseHeader) MarshalTo ¶
func (m *PrometheusResponseHeader) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusResponseHeader) MarshalToSizedBuffer ¶
func (m *PrometheusResponseHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusResponseHeader) ProtoMessage ¶
func (*PrometheusResponseHeader) ProtoMessage()
func (*PrometheusResponseHeader) Reset ¶
func (m *PrometheusResponseHeader) Reset()
func (*PrometheusResponseHeader) Size ¶
func (m *PrometheusResponseHeader) Size() (n int)
func (*PrometheusResponseHeader) String ¶
func (this *PrometheusResponseHeader) String() string
func (*PrometheusResponseHeader) Unmarshal ¶
func (m *PrometheusResponseHeader) Unmarshal(dAtA []byte) error
func (*PrometheusResponseHeader) XXX_DiscardUnknown ¶
func (m *PrometheusResponseHeader) XXX_DiscardUnknown()
func (*PrometheusResponseHeader) XXX_Marshal ¶
func (m *PrometheusResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusResponseHeader) XXX_Merge ¶
func (m *PrometheusResponseHeader) XXX_Merge(src proto.Message)
func (*PrometheusResponseHeader) XXX_Size ¶
func (m *PrometheusResponseHeader) XXX_Size() int
func (*PrometheusResponseHeader) XXX_Unmarshal ¶
func (m *PrometheusResponseHeader) XXX_Unmarshal(b []byte) error
type PrometheusResponseQueryableSamplesStatsPerStep ¶
type PrometheusResponseQueryableSamplesStatsPerStep struct {
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
}
func (*PrometheusResponseQueryableSamplesStatsPerStep) Descriptor ¶
func (*PrometheusResponseQueryableSamplesStatsPerStep) Descriptor() ([]byte, []int)
func (*PrometheusResponseQueryableSamplesStatsPerStep) Equal ¶
func (this *PrometheusResponseQueryableSamplesStatsPerStep) Equal(that interface{}) bool
func (*PrometheusResponseQueryableSamplesStatsPerStep) GetTimestampMs ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) GetTimestampMs() int64
func (*PrometheusResponseQueryableSamplesStatsPerStep) GetValue ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) GetValue() int64
func (*PrometheusResponseQueryableSamplesStatsPerStep) GoString ¶
func (this *PrometheusResponseQueryableSamplesStatsPerStep) GoString() string
func (*PrometheusResponseQueryableSamplesStatsPerStep) Marshal ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) Marshal() (dAtA []byte, err error)
func (*PrometheusResponseQueryableSamplesStatsPerStep) MarshalTo ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusResponseQueryableSamplesStatsPerStep) MarshalToSizedBuffer ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusResponseQueryableSamplesStatsPerStep) ProtoMessage ¶
func (*PrometheusResponseQueryableSamplesStatsPerStep) ProtoMessage()
func (*PrometheusResponseQueryableSamplesStatsPerStep) Reset ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) Reset()
func (*PrometheusResponseQueryableSamplesStatsPerStep) Size ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) Size() (n int)
func (*PrometheusResponseQueryableSamplesStatsPerStep) String ¶
func (this *PrometheusResponseQueryableSamplesStatsPerStep) String() string
func (*PrometheusResponseQueryableSamplesStatsPerStep) Unmarshal ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) Unmarshal(dAtA []byte) error
func (*PrometheusResponseQueryableSamplesStatsPerStep) XXX_DiscardUnknown ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_DiscardUnknown()
func (*PrometheusResponseQueryableSamplesStatsPerStep) XXX_Marshal ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusResponseQueryableSamplesStatsPerStep) XXX_Merge ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Merge(src proto.Message)
func (*PrometheusResponseQueryableSamplesStatsPerStep) XXX_Size ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Size() int
func (*PrometheusResponseQueryableSamplesStatsPerStep) XXX_Unmarshal ¶
func (m *PrometheusResponseQueryableSamplesStatsPerStep) XXX_Unmarshal(b []byte) error
type PrometheusResponseSamplesStats ¶
type PrometheusResponseSamplesStats struct {
TotalQueryableSamples int64 `protobuf:"varint,1,opt,name=totalQueryableSamples,proto3" json:"totalQueryableSamples"`
TotalQueryableSamplesPerStep []*PrometheusResponseQueryableSamplesStatsPerStep `protobuf:"bytes,2,rep,name=totalQueryableSamplesPerStep,proto3" json:"totalQueryableSamplesPerStep"`
PeakSamples int64 `protobuf:"varint,3,opt,name=peakSamples,proto3" json:"peakSamples"`
}
func (*PrometheusResponseSamplesStats) Descriptor ¶
func (*PrometheusResponseSamplesStats) Descriptor() ([]byte, []int)
func (*PrometheusResponseSamplesStats) Equal ¶
func (this *PrometheusResponseSamplesStats) Equal(that interface{}) bool
func (*PrometheusResponseSamplesStats) GetPeakSamples ¶ added in v1.19.0
func (m *PrometheusResponseSamplesStats) GetPeakSamples() int64
func (*PrometheusResponseSamplesStats) GetTotalQueryableSamples ¶
func (m *PrometheusResponseSamplesStats) GetTotalQueryableSamples() int64
func (*PrometheusResponseSamplesStats) GetTotalQueryableSamplesPerStep ¶
func (m *PrometheusResponseSamplesStats) GetTotalQueryableSamplesPerStep() []*PrometheusResponseQueryableSamplesStatsPerStep
func (*PrometheusResponseSamplesStats) GoString ¶
func (this *PrometheusResponseSamplesStats) GoString() string
func (*PrometheusResponseSamplesStats) Marshal ¶
func (m *PrometheusResponseSamplesStats) Marshal() (dAtA []byte, err error)
func (*PrometheusResponseSamplesStats) MarshalTo ¶
func (m *PrometheusResponseSamplesStats) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusResponseSamplesStats) MarshalToSizedBuffer ¶
func (m *PrometheusResponseSamplesStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusResponseSamplesStats) ProtoMessage ¶
func (*PrometheusResponseSamplesStats) ProtoMessage()
func (*PrometheusResponseSamplesStats) Reset ¶
func (m *PrometheusResponseSamplesStats) Reset()
func (*PrometheusResponseSamplesStats) Size ¶
func (m *PrometheusResponseSamplesStats) Size() (n int)
func (*PrometheusResponseSamplesStats) String ¶
func (this *PrometheusResponseSamplesStats) String() string
func (*PrometheusResponseSamplesStats) Unmarshal ¶
func (m *PrometheusResponseSamplesStats) Unmarshal(dAtA []byte) error
func (*PrometheusResponseSamplesStats) XXX_DiscardUnknown ¶
func (m *PrometheusResponseSamplesStats) XXX_DiscardUnknown()
func (*PrometheusResponseSamplesStats) XXX_Marshal ¶
func (m *PrometheusResponseSamplesStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusResponseSamplesStats) XXX_Merge ¶
func (m *PrometheusResponseSamplesStats) XXX_Merge(src proto.Message)
func (*PrometheusResponseSamplesStats) XXX_Size ¶
func (m *PrometheusResponseSamplesStats) XXX_Size() int
func (*PrometheusResponseSamplesStats) XXX_Unmarshal ¶
func (m *PrometheusResponseSamplesStats) XXX_Unmarshal(b []byte) error
type PrometheusResponseStats ¶
type PrometheusResponseStats struct {
Samples *PrometheusResponseSamplesStats `protobuf:"bytes,1,opt,name=samples,proto3" json:"samples"`
}
func (*PrometheusResponseStats) Descriptor ¶
func (*PrometheusResponseStats) Descriptor() ([]byte, []int)
func (*PrometheusResponseStats) Equal ¶
func (this *PrometheusResponseStats) Equal(that interface{}) bool
func (*PrometheusResponseStats) GetSamples ¶
func (m *PrometheusResponseStats) GetSamples() *PrometheusResponseSamplesStats
func (*PrometheusResponseStats) GoString ¶
func (this *PrometheusResponseStats) GoString() string
func (*PrometheusResponseStats) Marshal ¶
func (m *PrometheusResponseStats) Marshal() (dAtA []byte, err error)
func (*PrometheusResponseStats) MarshalJSON ¶ added in v1.19.0
func (s *PrometheusResponseStats) MarshalJSON() ([]byte, error)
func (*PrometheusResponseStats) MarshalTo ¶
func (m *PrometheusResponseStats) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusResponseStats) MarshalToSizedBuffer ¶
func (m *PrometheusResponseStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusResponseStats) ProtoMessage ¶
func (*PrometheusResponseStats) ProtoMessage()
func (*PrometheusResponseStats) Reset ¶
func (m *PrometheusResponseStats) Reset()
func (*PrometheusResponseStats) Size ¶
func (m *PrometheusResponseStats) Size() (n int)
func (*PrometheusResponseStats) String ¶
func (this *PrometheusResponseStats) String() string
func (*PrometheusResponseStats) Unmarshal ¶
func (m *PrometheusResponseStats) Unmarshal(dAtA []byte) error
func (*PrometheusResponseStats) XXX_DiscardUnknown ¶
func (m *PrometheusResponseStats) XXX_DiscardUnknown()
func (*PrometheusResponseStats) XXX_Marshal ¶
func (m *PrometheusResponseStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusResponseStats) XXX_Merge ¶
func (m *PrometheusResponseStats) XXX_Merge(src proto.Message)
func (*PrometheusResponseStats) XXX_Size ¶
func (m *PrometheusResponseStats) XXX_Size() int
func (*PrometheusResponseStats) XXX_Unmarshal ¶
func (m *PrometheusResponseStats) XXX_Unmarshal(b []byte) error
type Request ¶
type Request interface {
// GetStart returns the start timestamp of the request in milliseconds.
GetStart() int64
// GetEnd returns the end timestamp of the request in milliseconds.
GetEnd() int64
// GetStep returns the step of the request in milliseconds.
GetStep() int64
// GetQuery returns the query of the request.
GetQuery() string
// GetLogicalPlan returns the logical plan
GetLogicalPlan() logicalplan.Plan
// WithStartEnd clone the current request with different start and end timestamp.
WithStartEnd(startTime int64, endTime int64) Request
// WithQuery clone the current request with a different query.
WithQuery(string) Request
proto.Message
// LogToSpan writes information about this request to an OpenTracing span
LogToSpan(opentracing.Span)
// GetStats returns the stats of the request.
GetStats() string
// WithStats clones the current `PrometheusRequest` with a new stats.
WithStats(stats string) Request
}
Request represents a query range request that can be process by middlewares.
type RequestResponse ¶
RequestResponse contains a request response and the respective request that was used.
func DoRequests ¶
func DoRequests(ctx context.Context, downstream Handler, reqs []Request, limits Limits) ([]RequestResponse, error)
DoRequests executes a list of requests in parallel. The limits parameters is used to limit parallelism per single request.
type Response ¶
type Response interface {
proto.Message
// HTTPHeaders returns the HTTP headers in the response.
HTTPHeaders() map[string][]string
}
Response represents a query range response.
type RoundTripFunc ¶
RoundTripFunc is to http.RoundTripper what http.HandlerFunc is to http.Handler.
type Sample ¶ added in v1.19.0
type Sample struct {
Labels []github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" json:"metric"`
Sample *cortexpb.Sample `protobuf:"bytes,2,opt,name=sample,proto3" json:"value"`
Histogram *SampleHistogramPair `protobuf:"bytes,3,opt,name=histogram,proto3" json:"histogram"`
// Full representation of a native histogram and it should be always float histogram type.
// This field should be never deserialized into JSON and should only exist in protobuf format.
RawHistogram *cortexpb.Histogram `protobuf:"bytes,4,opt,name=rawHistogram,proto3" json:"-"`
}
func (*Sample) Descriptor ¶ added in v1.19.0
func (*Sample) GetHistogram ¶ added in v1.19.0
func (m *Sample) GetHistogram() *SampleHistogramPair
func (*Sample) GetRawHistogram ¶ added in v1.19.0
func (*Sample) GetTimestampMs ¶ added in v1.19.0
func (*Sample) MarshalToSizedBuffer ¶ added in v1.19.0
func (*Sample) ProtoMessage ¶ added in v1.19.0
func (*Sample) ProtoMessage()
func (*Sample) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *Sample) XXX_DiscardUnknown()
func (*Sample) XXX_Marshal ¶ added in v1.19.0
func (*Sample) XXX_Unmarshal ¶ added in v1.19.0
type SampleHistogram ¶ added in v1.18.0
type SampleHistogram struct {
Count float64 `protobuf:"fixed64,1,opt,name=count,proto3" json:"count,omitempty"`
Sum float64 `protobuf:"fixed64,2,opt,name=sum,proto3" json:"sum,omitempty"`
Buckets []*HistogramBucket `protobuf:"bytes,3,rep,name=buckets,proto3" json:"buckets,omitempty"`
}
func (*SampleHistogram) Descriptor ¶ added in v1.18.0
func (*SampleHistogram) Descriptor() ([]byte, []int)
func (*SampleHistogram) Equal ¶ added in v1.18.0
func (this *SampleHistogram) Equal(that interface{}) bool
func (*SampleHistogram) GetBuckets ¶ added in v1.18.0
func (m *SampleHistogram) GetBuckets() []*HistogramBucket
func (*SampleHistogram) GetCount ¶ added in v1.18.0
func (m *SampleHistogram) GetCount() float64
func (*SampleHistogram) GetSum ¶ added in v1.18.0
func (m *SampleHistogram) GetSum() float64
func (*SampleHistogram) GoString ¶ added in v1.18.0
func (this *SampleHistogram) GoString() string
func (*SampleHistogram) Marshal ¶ added in v1.18.0
func (m *SampleHistogram) Marshal() (dAtA []byte, err error)
func (*SampleHistogram) MarshalTo ¶ added in v1.18.0
func (m *SampleHistogram) MarshalTo(dAtA []byte) (int, error)
func (*SampleHistogram) MarshalToSizedBuffer ¶ added in v1.18.0
func (m *SampleHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SampleHistogram) ProtoMessage ¶ added in v1.18.0
func (*SampleHistogram) ProtoMessage()
func (*SampleHistogram) Reset ¶ added in v1.18.0
func (m *SampleHistogram) Reset()
func (*SampleHistogram) Size ¶ added in v1.18.0
func (m *SampleHistogram) Size() (n int)
func (*SampleHistogram) String ¶ added in v1.18.0
func (this *SampleHistogram) String() string
func (*SampleHistogram) Unmarshal ¶ added in v1.18.0
func (m *SampleHistogram) Unmarshal(dAtA []byte) error
func (*SampleHistogram) XXX_DiscardUnknown ¶ added in v1.18.0
func (m *SampleHistogram) XXX_DiscardUnknown()
func (*SampleHistogram) XXX_Marshal ¶ added in v1.18.0
func (m *SampleHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SampleHistogram) XXX_Merge ¶ added in v1.18.0
func (m *SampleHistogram) XXX_Merge(src proto.Message)
func (*SampleHistogram) XXX_Size ¶ added in v1.18.0
func (m *SampleHistogram) XXX_Size() int
func (*SampleHistogram) XXX_Unmarshal ¶ added in v1.18.0
func (m *SampleHistogram) XXX_Unmarshal(b []byte) error
type SampleHistogramPair ¶ added in v1.18.0
type SampleHistogramPair struct {
TimestampMs int64 `protobuf:"varint,1,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
Histogram SampleHistogram `protobuf:"bytes,2,opt,name=histogram,proto3" json:"histogram"`
}
func (*SampleHistogramPair) Descriptor ¶ added in v1.18.0
func (*SampleHistogramPair) Descriptor() ([]byte, []int)
func (*SampleHistogramPair) Equal ¶ added in v1.18.0
func (this *SampleHistogramPair) Equal(that interface{}) bool
func (*SampleHistogramPair) GetHistogram ¶ added in v1.18.0
func (m *SampleHistogramPair) GetHistogram() SampleHistogram
func (*SampleHistogramPair) GetTimestampMs ¶ added in v1.18.0
func (m *SampleHistogramPair) GetTimestampMs() int64
func (*SampleHistogramPair) GoString ¶ added in v1.18.0
func (this *SampleHistogramPair) GoString() string
func (*SampleHistogramPair) Marshal ¶ added in v1.18.0
func (m *SampleHistogramPair) Marshal() (dAtA []byte, err error)
func (*SampleHistogramPair) MarshalTo ¶ added in v1.18.0
func (m *SampleHistogramPair) MarshalTo(dAtA []byte) (int, error)
func (*SampleHistogramPair) MarshalToSizedBuffer ¶ added in v1.18.0
func (m *SampleHistogramPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SampleHistogramPair) ProtoMessage ¶ added in v1.18.0
func (*SampleHistogramPair) ProtoMessage()
func (*SampleHistogramPair) Reset ¶ added in v1.18.0
func (m *SampleHistogramPair) Reset()
func (*SampleHistogramPair) Size ¶ added in v1.18.0
func (m *SampleHistogramPair) Size() (n int)
func (*SampleHistogramPair) String ¶ added in v1.18.0
func (this *SampleHistogramPair) String() string
func (*SampleHistogramPair) Unmarshal ¶ added in v1.18.0
func (m *SampleHistogramPair) Unmarshal(dAtA []byte) error
func (*SampleHistogramPair) XXX_DiscardUnknown ¶ added in v1.18.0
func (m *SampleHistogramPair) XXX_DiscardUnknown()
func (*SampleHistogramPair) XXX_Marshal ¶ added in v1.18.0
func (m *SampleHistogramPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SampleHistogramPair) XXX_Merge ¶ added in v1.18.0
func (m *SampleHistogramPair) XXX_Merge(src proto.Message)
func (*SampleHistogramPair) XXX_Size ¶ added in v1.18.0
func (m *SampleHistogramPair) XXX_Size() int
func (*SampleHistogramPair) XXX_Unmarshal ¶ added in v1.18.0
func (m *SampleHistogramPair) XXX_Unmarshal(b []byte) error
type SampleStream ¶
type SampleStream struct {
Labels []github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" json:"metric"`
Samples []cortexpb.Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"values"`
Histograms []SampleHistogramPair `protobuf:"bytes,3,rep,name=histograms,proto3" json:"histograms"`
}
func (*SampleStream) Descriptor ¶
func (*SampleStream) Descriptor() ([]byte, []int)
func (*SampleStream) Equal ¶
func (this *SampleStream) Equal(that interface{}) bool
func (*SampleStream) GetHistograms ¶ added in v1.18.0
func (m *SampleStream) GetHistograms() []SampleHistogramPair
func (*SampleStream) GetSamples ¶
func (m *SampleStream) GetSamples() []cortexpb.Sample
func (*SampleStream) GoString ¶
func (this *SampleStream) GoString() string
func (*SampleStream) Marshal ¶
func (m *SampleStream) Marshal() (dAtA []byte, err error)
func (*SampleStream) MarshalToSizedBuffer ¶
func (m *SampleStream) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SampleStream) ProtoMessage ¶
func (*SampleStream) ProtoMessage()
func (*SampleStream) Reset ¶
func (m *SampleStream) Reset()
func (*SampleStream) Size ¶
func (m *SampleStream) Size() (n int)
func (*SampleStream) String ¶
func (this *SampleStream) String() string
func (*SampleStream) Unmarshal ¶
func (m *SampleStream) Unmarshal(dAtA []byte) error
func (*SampleStream) XXX_DiscardUnknown ¶
func (m *SampleStream) XXX_DiscardUnknown()
func (*SampleStream) XXX_Marshal ¶
func (m *SampleStream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SampleStream) XXX_Merge ¶
func (m *SampleStream) XXX_Merge(src proto.Message)
func (*SampleStream) XXX_Size ¶
func (m *SampleStream) XXX_Size() int
func (*SampleStream) XXX_Unmarshal ¶
func (m *SampleStream) XXX_Unmarshal(b []byte) error
type Tripperware ¶
type Tripperware func(http.RoundTripper) http.RoundTripper
Tripperware is a signature for all http client-side middleware.
func NewQueryTripperware ¶
func NewQueryTripperware( log log.Logger, registerer prometheus.Registerer, forwardHeaders []string, queryRangeMiddleware []Middleware, instantRangeMiddleware []Middleware, queryRangeCodec Codec, instantQueryCodec Codec, limits Limits, queryAnalyzer querysharding.Analyzer, defaultSubQueryInterval time.Duration, maxSubQuerySteps int64, lookbackDelta time.Duration, ) Tripperware
type Vector ¶ added in v1.19.0
type Vector struct {
Samples []Sample `protobuf:"bytes,1,rep,name=samples,proto3" json:"samples"`
}
func (*Vector) Descriptor ¶ added in v1.19.0
func (*Vector) GetSamples ¶ added in v1.19.0
func (*Vector) MarshalToSizedBuffer ¶ added in v1.19.0
func (*Vector) ProtoMessage ¶ added in v1.19.0
func (*Vector) ProtoMessage()
func (*Vector) XXX_DiscardUnknown ¶ added in v1.19.0
func (m *Vector) XXX_DiscardUnknown()