Documentation
¶
Index ¶
- Constants
- Variables
- func CopyLabels(input []LabelAdapter) labels.Labels
- func FloatHistogramProtoToFloatHistogram(hp Histogram) *histogram.FloatHistogram
- func FromExemplarProtosToExemplars(es []Exemplar) []exemplar.Exemplar
- func FromLabelAdaptersToLabels(ls []LabelAdapter) labels.Labels
- func FromLabelAdaptersToLabelsWithCopy(input []LabelAdapter) labels.Labels
- func FromLabelAdaptersToMetric(ls []LabelAdapter) model.Metric
- func FromLabelAdaptersToMetricWithCopy(ls []LabelAdapter) model.Metric
- func HistogramProtoToHistogram(hp Histogram) *histogram.Histogram
- func LabelsToFingerprint(lset labels.Labels) model.Fingerprint
- func MetricMetadataMetricTypeToMetricType(mt MetricMetadata_MetricType) model.MetricType
- func ReuseSlice(ts []PreallocTimeseries)
- func ReuseSliceV2(ts []PreallocTimeseriesV2)
- func ReuseTimeseries(ts *TimeSeries)
- func ReuseTimeseriesV2(ts *TimeSeriesV2)
- func ReuseWriteRequest(req *PreallocWriteRequest)
- func ReuseWriteRequestV2(req *PreallocWriteRequestV2)
- func SampleJsoniterDecode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func SampleJsoniterEncode(ptr unsafe.Pointer, stream *jsoniter.Stream)
- type BucketSpan
- func (*BucketSpan) Descriptor() ([]byte, []int)
- func (this *BucketSpan) Equal(that interface{}) bool
- func (m *BucketSpan) GetLength() uint32
- func (m *BucketSpan) GetOffset() int32
- func (this *BucketSpan) GoString() string
- func (m *BucketSpan) Marshal() (dAtA []byte, err error)
- func (m *BucketSpan) MarshalTo(dAtA []byte) (int, error)
- func (m *BucketSpan) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BucketSpan) ProtoMessage()
- func (m *BucketSpan) Reset()
- func (m *BucketSpan) Size() (n int)
- func (this *BucketSpan) String() string
- func (m *BucketSpan) Unmarshal(dAtA []byte) error
- func (m *BucketSpan) XXX_DiscardUnknown()
- func (m *BucketSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BucketSpan) XXX_Merge(src proto.Message)
- func (m *BucketSpan) XXX_Size() int
- func (m *BucketSpan) XXX_Unmarshal(b []byte) error
- type Exemplar
- func (*Exemplar) Descriptor() ([]byte, []int)
- func (this *Exemplar) Equal(that interface{}) bool
- func (m *Exemplar) GetTimestampMs() int64
- func (m *Exemplar) GetValue() float64
- func (this *Exemplar) GoString() string
- func (m *Exemplar) Marshal() (dAtA []byte, err error)
- func (m *Exemplar) MarshalTo(dAtA []byte) (int, error)
- func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Exemplar) ProtoMessage()
- func (m *Exemplar) Reset()
- func (m *Exemplar) Size() (n int)
- func (this *Exemplar) String() string
- func (m *Exemplar) Unmarshal(dAtA []byte) error
- func (m *Exemplar) XXX_DiscardUnknown()
- func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Exemplar) XXX_Merge(src proto.Message)
- func (m *Exemplar) XXX_Size() int
- func (m *Exemplar) XXX_Unmarshal(b []byte) error
- type ExemplarV2
- func (*ExemplarV2) Descriptor() ([]byte, []int)
- func (this *ExemplarV2) Equal(that interface{}) bool
- func (m *ExemplarV2) GetLabelsRefs() []uint32
- func (m *ExemplarV2) GetTimestamp() int64
- func (m *ExemplarV2) GetValue() float64
- func (this *ExemplarV2) GoString() string
- func (m *ExemplarV2) Marshal() (dAtA []byte, err error)
- func (m *ExemplarV2) MarshalTo(dAtA []byte) (int, error)
- func (m *ExemplarV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ExemplarV2) ProtoMessage()
- func (m *ExemplarV2) Reset()
- func (m *ExemplarV2) Size() (n int)
- func (this *ExemplarV2) String() string
- func (e *ExemplarV2) ToLabels(b *labels.ScratchBuilder, symbols []string) labels.Labels
- func (m *ExemplarV2) Unmarshal(dAtA []byte) error
- func (m *ExemplarV2) XXX_DiscardUnknown()
- func (m *ExemplarV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExemplarV2) XXX_Merge(src proto.Message)
- func (m *ExemplarV2) XXX_Size() int
- func (m *ExemplarV2) XXX_Unmarshal(b []byte) error
- type GogoProtoMessage
- type Histogram
- func (*Histogram) Descriptor() ([]byte, []int)
- func (this *Histogram) Equal(that interface{}) bool
- func (m *Histogram) GetCount() isHistogram_Count
- func (m *Histogram) GetCountFloat() float64
- func (m *Histogram) GetCountInt() uint64
- func (m *Histogram) GetNegativeCounts() []float64
- func (m *Histogram) GetNegativeDeltas() []int64
- func (m *Histogram) GetNegativeSpans() []BucketSpan
- func (m *Histogram) GetPositiveCounts() []float64
- func (m *Histogram) GetPositiveDeltas() []int64
- func (m *Histogram) GetPositiveSpans() []BucketSpan
- func (m *Histogram) GetResetHint() Histogram_ResetHint
- func (m *Histogram) GetSchema() int32
- func (m *Histogram) GetSum() float64
- func (m *Histogram) GetTimestampMs() int64
- func (m *Histogram) GetZeroCount() isHistogram_ZeroCount
- func (m *Histogram) GetZeroCountFloat() float64
- func (m *Histogram) GetZeroCountInt() uint64
- func (m *Histogram) GetZeroThreshold() float64
- func (this *Histogram) GoString() string
- func (h Histogram) IsFloatHistogram() bool
- func (m *Histogram) Marshal() (dAtA []byte, err error)
- func (m *Histogram) MarshalTo(dAtA []byte) (int, error)
- func (m *Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Histogram) ProtoMessage()
- func (m *Histogram) Reset()
- func (m *Histogram) Size() (n int)
- func (this *Histogram) String() string
- func (m *Histogram) Unmarshal(dAtA []byte) error
- func (m *Histogram) XXX_DiscardUnknown()
- func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Histogram) XXX_Merge(src proto.Message)
- func (*Histogram) XXX_OneofWrappers() []interface{}
- func (m *Histogram) XXX_Size() int
- func (m *Histogram) XXX_Unmarshal(b []byte) error
- type Histogram_CountFloat
- func (this *Histogram_CountFloat) Equal(that interface{}) bool
- func (this *Histogram_CountFloat) GoString() string
- func (m *Histogram_CountFloat) MarshalTo(dAtA []byte) (int, error)
- func (m *Histogram_CountFloat) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Histogram_CountFloat) Size() (n int)
- func (this *Histogram_CountFloat) String() string
- type Histogram_CountInt
- func (this *Histogram_CountInt) Equal(that interface{}) bool
- func (this *Histogram_CountInt) GoString() string
- func (m *Histogram_CountInt) MarshalTo(dAtA []byte) (int, error)
- func (m *Histogram_CountInt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Histogram_CountInt) Size() (n int)
- func (this *Histogram_CountInt) String() string
- type Histogram_ResetHint
- type Histogram_ZeroCountFloat
- func (this *Histogram_ZeroCountFloat) Equal(that interface{}) bool
- func (this *Histogram_ZeroCountFloat) GoString() string
- func (m *Histogram_ZeroCountFloat) MarshalTo(dAtA []byte) (int, error)
- func (m *Histogram_ZeroCountFloat) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Histogram_ZeroCountFloat) Size() (n int)
- func (this *Histogram_ZeroCountFloat) String() string
- type Histogram_ZeroCountInt
- func (this *Histogram_ZeroCountInt) Equal(that interface{}) bool
- func (this *Histogram_ZeroCountInt) GoString() string
- func (m *Histogram_ZeroCountInt) MarshalTo(dAtA []byte) (int, error)
- func (m *Histogram_ZeroCountInt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Histogram_ZeroCountInt) Size() (n int)
- func (this *Histogram_ZeroCountInt) String() string
- type LabelAdapter
- func (bs *LabelAdapter) Compare(other LabelAdapter) int
- func (bs *LabelAdapter) Equal(other LabelAdapter) bool
- func (bs *LabelAdapter) Marshal() ([]byte, error)
- func (bs *LabelAdapter) MarshalTo(dAtA []byte) (int, error)
- func (bs *LabelAdapter) MarshalToSizedBuffer(buf []byte) (n int, err error)
- func (bs *LabelAdapter) Size() (n int)
- func (bs *LabelAdapter) Unmarshal(dAtA []byte) error
- type LabelPair
- func (*LabelPair) Descriptor() ([]byte, []int)
- func (this *LabelPair) Equal(that interface{}) bool
- func (m *LabelPair) GetName() []byte
- func (m *LabelPair) GetValue() []byte
- func (this *LabelPair) GoString() string
- func (m *LabelPair) Marshal() (dAtA []byte, err error)
- func (m *LabelPair) MarshalTo(dAtA []byte) (int, error)
- func (m *LabelPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LabelPair) ProtoMessage()
- func (m *LabelPair) Reset()
- func (m *LabelPair) Size() (n int)
- func (this *LabelPair) String() string
- func (m *LabelPair) Unmarshal(dAtA []byte) error
- func (m *LabelPair) XXX_DiscardUnknown()
- func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LabelPair) XXX_Merge(src proto.Message)
- func (m *LabelPair) XXX_Size() int
- func (m *LabelPair) XXX_Unmarshal(b []byte) error
- type MessageWithBufRef
- func (*MessageWithBufRef) Descriptor() ([]byte, []int)
- func (this *MessageWithBufRef) Equal(that interface{}) bool
- func (m *MessageWithBufRef) Free()
- func (this *MessageWithBufRef) GoString() string
- func (m *MessageWithBufRef) Marshal() (dAtA []byte, err error)
- func (m *MessageWithBufRef) MarshalTo(dAtA []byte) (int, error)
- func (m *MessageWithBufRef) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MessageWithBufRef) ProtoMessage()
- func (m *MessageWithBufRef) RegisterBuffer(buffer mem.Buffer)
- func (m *MessageWithBufRef) Reset()
- func (m *MessageWithBufRef) Size() (n int)
- func (this *MessageWithBufRef) String() string
- func (m *MessageWithBufRef) Unmarshal(dAtA []byte) error
- func (m *MessageWithBufRef) XXX_DiscardUnknown()
- func (m *MessageWithBufRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MessageWithBufRef) XXX_Merge(src proto.Message)
- func (m *MessageWithBufRef) XXX_Size() int
- func (m *MessageWithBufRef) XXX_Unmarshal(b []byte) error
- type MetadataV2
- func (*MetadataV2) Descriptor() ([]byte, []int)
- func (this *MetadataV2) Equal(that interface{}) bool
- func (m *MetadataV2) GetHelpRef() uint32
- func (m *MetadataV2) GetType() MetadataV2_MetricType
- func (m *MetadataV2) GetUnitRef() uint32
- func (this *MetadataV2) GoString() string
- func (m *MetadataV2) Marshal() (dAtA []byte, err error)
- func (m *MetadataV2) MarshalTo(dAtA []byte) (int, error)
- func (m *MetadataV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MetadataV2) ProtoMessage()
- func (m *MetadataV2) Reset()
- func (m *MetadataV2) Size() (n int)
- func (this *MetadataV2) String() string
- func (m *MetadataV2) Unmarshal(dAtA []byte) error
- func (m *MetadataV2) XXX_DiscardUnknown()
- func (m *MetadataV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetadataV2) XXX_Merge(src proto.Message)
- func (m *MetadataV2) XXX_Size() int
- func (m *MetadataV2) XXX_Unmarshal(b []byte) error
- type MetadataV2_MetricType
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)
- func (this *Metric) Equal(that interface{}) bool
- func (this *Metric) GoString() string
- func (m *Metric) Marshal() (dAtA []byte, err error)
- func (m *Metric) MarshalTo(dAtA []byte) (int, error)
- func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Metric) ProtoMessage()
- func (m *Metric) Reset()
- func (m *Metric) Size() (n int)
- func (this *Metric) String() string
- func (m *Metric) Unmarshal(dAtA []byte) error
- func (m *Metric) XXX_DiscardUnknown()
- func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metric) XXX_Merge(src proto.Message)
- func (m *Metric) XXX_Size() int
- func (m *Metric) XXX_Unmarshal(b []byte) error
- type MetricMetadata
- func (*MetricMetadata) Descriptor() ([]byte, []int)
- func (this *MetricMetadata) Equal(that interface{}) bool
- func (m *MetricMetadata) GetHelp() string
- func (m *MetricMetadata) GetMetricFamilyName() string
- func (m *MetricMetadata) GetType() MetricMetadata_MetricType
- func (m *MetricMetadata) GetUnit() string
- func (this *MetricMetadata) GoString() string
- func (m *MetricMetadata) Marshal() (dAtA []byte, err error)
- func (m *MetricMetadata) MarshalTo(dAtA []byte) (int, error)
- func (m *MetricMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MetricMetadata) ProtoMessage()
- func (m *MetricMetadata) Reset()
- func (m *MetricMetadata) Size() (n int)
- func (this *MetricMetadata) String() string
- func (m *MetricMetadata) Unmarshal(dAtA []byte) error
- func (m *MetricMetadata) XXX_DiscardUnknown()
- func (m *MetricMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricMetadata) XXX_Merge(src proto.Message)
- func (m *MetricMetadata) XXX_Size() int
- func (m *MetricMetadata) XXX_Unmarshal(b []byte) error
- type MetricMetadata_MetricType
- type PreallocConfig
- type PreallocTimeseries
- type PreallocTimeseriesV2
- type PreallocWriteRequest
- type PreallocWriteRequestV2
- type ReleasableMessage
- type Sample
- func (*Sample) Descriptor() ([]byte, []int)
- func (this *Sample) Equal(that interface{}) bool
- func (m *Sample) GetTimestampMs() int64
- func (m *Sample) GetValue() float64
- func (this *Sample) GoString() string
- func (m *Sample) Marshal() (dAtA []byte, err error)
- func (s Sample) MarshalJSON() ([]byte, 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 (s *Sample) UnmarshalJSON(b []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 SourceEnum
- type StreamWriteRequest
- func (*StreamWriteRequest) Descriptor() ([]byte, []int)
- func (this *StreamWriteRequest) Equal(that interface{}) bool
- func (m *StreamWriteRequest) GetRequest() *WriteRequest
- func (m *StreamWriteRequest) GetTenantID() string
- func (this *StreamWriteRequest) GoString() string
- func (m *StreamWriteRequest) Marshal() (dAtA []byte, err error)
- func (m *StreamWriteRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *StreamWriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StreamWriteRequest) ProtoMessage()
- func (m *StreamWriteRequest) Reset()
- func (m *StreamWriteRequest) Size() (n int)
- func (this *StreamWriteRequest) String() string
- func (m *StreamWriteRequest) Unmarshal(dAtA []byte) error
- func (m *StreamWriteRequest) XXX_DiscardUnknown()
- func (m *StreamWriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamWriteRequest) XXX_Merge(src proto.Message)
- func (m *StreamWriteRequest) XXX_Size() int
- func (m *StreamWriteRequest) XXX_Unmarshal(b []byte) error
- type TimeSeries
- func (*TimeSeries) Descriptor() ([]byte, []int)
- func (this *TimeSeries) Equal(that interface{}) bool
- func (m *TimeSeries) GetExemplars() []Exemplar
- func (m *TimeSeries) GetHistograms() []Histogram
- func (m *TimeSeries) GetSamples() []Sample
- func (this *TimeSeries) GoString() string
- func (m *TimeSeries) Marshal() (dAtA []byte, err error)
- func (m *TimeSeries) MarshalTo(dAtA []byte) (int, error)
- func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TimeSeries) ProtoMessage()
- func (m *TimeSeries) Reset()
- func (m *TimeSeries) Size() (n int)
- func (this *TimeSeries) String() string
- func (m *TimeSeries) Unmarshal(dAtA []byte) error
- func (m *TimeSeries) XXX_DiscardUnknown()
- func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeSeries) XXX_Merge(src proto.Message)
- func (m *TimeSeries) XXX_Size() int
- func (m *TimeSeries) XXX_Unmarshal(b []byte) error
- type TimeSeriesV2
- func (*TimeSeriesV2) Descriptor() ([]byte, []int)
- func (this *TimeSeriesV2) Equal(that interface{}) bool
- func (m *TimeSeriesV2) GetCreatedTimestamp() int64
- func (m *TimeSeriesV2) GetExemplars() []ExemplarV2
- func (m *TimeSeriesV2) GetHistograms() []Histogram
- func (m *TimeSeriesV2) GetLabelsRefs() []uint32
- func (m *TimeSeriesV2) GetMetadata() MetadataV2
- func (m *TimeSeriesV2) GetSamples() []Sample
- func (this *TimeSeriesV2) GoString() string
- func (m *TimeSeriesV2) Marshal() (dAtA []byte, err error)
- func (m *TimeSeriesV2) MarshalTo(dAtA []byte) (int, error)
- func (m *TimeSeriesV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TimeSeriesV2) ProtoMessage()
- func (m *TimeSeriesV2) Reset()
- func (m *TimeSeriesV2) Size() (n int)
- func (this *TimeSeriesV2) String() string
- func (t *TimeSeriesV2) ToLabels(b *labels.ScratchBuilder, symbols []string) labels.Labels
- func (m *TimeSeriesV2) Unmarshal(dAtA []byte) error
- func (m *TimeSeriesV2) XXX_DiscardUnknown()
- func (m *TimeSeriesV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeSeriesV2) XXX_Merge(src proto.Message)
- func (m *TimeSeriesV2) XXX_Size() int
- func (m *TimeSeriesV2) XXX_Unmarshal(b []byte) error
- type WriteRequest
- func (w *WriteRequest) AddHistogramTimeSeries(lbls []labels.Labels, histograms []Histogram)
- func (*WriteRequest) Descriptor() ([]byte, []int)
- func (this *WriteRequest) Equal(that interface{}) bool
- func (m *WriteRequest) GetMetadata() []*MetricMetadata
- func (m *WriteRequest) GetSkipLabelNameValidation() bool
- func (m *WriteRequest) GetSource() SourceEnum
- func (this *WriteRequest) GoString() string
- func (m *WriteRequest) Marshal() (dAtA []byte, err error)
- func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *WriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WriteRequest) ProtoMessage()
- func (m *WriteRequest) Reset()
- func (w *WriteRequest) Sign(ctx context.Context) (string, error)
- func (m *WriteRequest) Size() (n int)
- func (this *WriteRequest) String() string
- func (m *WriteRequest) Unmarshal(dAtA []byte) error
- func (w *WriteRequest) VerifySign(ctx context.Context, signature string) (bool, error)
- func (m *WriteRequest) XXX_DiscardUnknown()
- func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteRequest) XXX_Merge(src proto.Message)
- func (m *WriteRequest) XXX_Size() int
- func (m *WriteRequest) XXX_Unmarshal(b []byte) error
- type WriteRequestV2
- func (*WriteRequestV2) Descriptor() ([]byte, []int)
- func (this *WriteRequestV2) Equal(that interface{}) bool
- func (m *WriteRequestV2) GetSkipLabelNameValidation() bool
- func (m *WriteRequestV2) GetSource() SourceEnum
- func (m *WriteRequestV2) GetSymbols() []string
- func (this *WriteRequestV2) GoString() string
- func (m *WriteRequestV2) Marshal() (dAtA []byte, err error)
- func (m *WriteRequestV2) MarshalTo(dAtA []byte) (int, error)
- func (m *WriteRequestV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WriteRequestV2) ProtoMessage()
- func (m *WriteRequestV2) Reset()
- func (m *WriteRequestV2) Size() (n int)
- func (this *WriteRequestV2) String() string
- func (m *WriteRequestV2) Unmarshal(dAtA []byte) error
- func (m *WriteRequestV2) XXX_DiscardUnknown()
- func (m *WriteRequestV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteRequestV2) XXX_Merge(src proto.Message)
- func (m *WriteRequestV2) XXX_Size() int
- func (m *WriteRequestV2) XXX_Unmarshal(b []byte) error
- type WriteResponse
- func (*WriteResponse) Descriptor() ([]byte, []int)
- func (this *WriteResponse) Equal(that interface{}) bool
- func (m *WriteResponse) GetCode() int32
- func (m *WriteResponse) GetExemplars() int64
- func (m *WriteResponse) GetHistograms() int64
- func (m *WriteResponse) GetMessage() string
- func (m *WriteResponse) GetSamples() int64
- func (this *WriteResponse) GoString() string
- func (m *WriteResponse) Marshal() (dAtA []byte, err error)
- func (m *WriteResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *WriteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WriteResponse) ProtoMessage()
- func (m *WriteResponse) Reset()
- func (m *WriteResponse) Size() (n int)
- func (this *WriteResponse) String() string
- func (m *WriteResponse) Unmarshal(dAtA []byte) error
- func (m *WriteResponse) XXX_DiscardUnknown()
- func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteResponse) XXX_Merge(src proto.Message)
- func (m *WriteResponse) XXX_Size() int
- func (m *WriteResponse) XXX_Unmarshal(b []byte) error
Constants ¶
const Name = "proto"
Name is the name registered for the proto codec.
Variables ¶
var ( ErrInvalidLengthCortex = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCortex = fmt.Errorf("proto: integer overflow") )
var Histogram_ResetHint_name = map[int32]string{
0: "UNKNOWN",
1: "YES",
2: "NO",
3: "GAUGE",
}
var Histogram_ResetHint_value = map[string]int32{
"UNKNOWN": 0,
"YES": 1,
"NO": 2,
"GAUGE": 3,
}
var MetadataV2_MetricType_name = map[int32]string{
0: "METRIC_TYPE_UNSPECIFIED",
1: "METRIC_TYPE_COUNTER",
2: "METRIC_TYPE_GAUGE",
3: "METRIC_TYPE_HISTOGRAM",
4: "METRIC_TYPE_GAUGEHISTOGRAM",
5: "METRIC_TYPE_SUMMARY",
6: "METRIC_TYPE_INFO",
7: "METRIC_TYPE_STATESET",
}
var MetadataV2_MetricType_value = map[string]int32{
"METRIC_TYPE_UNSPECIFIED": 0,
"METRIC_TYPE_COUNTER": 1,
"METRIC_TYPE_GAUGE": 2,
"METRIC_TYPE_HISTOGRAM": 3,
"METRIC_TYPE_GAUGEHISTOGRAM": 4,
"METRIC_TYPE_SUMMARY": 5,
"METRIC_TYPE_INFO": 6,
"METRIC_TYPE_STATESET": 7,
}
var MetricMetadata_MetricType_name = map[int32]string{
0: "UNKNOWN",
1: "COUNTER",
2: "GAUGE",
3: "HISTOGRAM",
4: "GAUGEHISTOGRAM",
5: "SUMMARY",
6: "INFO",
7: "STATESET",
}
var MetricMetadata_MetricType_value = map[string]int32{
"UNKNOWN": 0,
"COUNTER": 1,
"GAUGE": 2,
"HISTOGRAM": 3,
"GAUGEHISTOGRAM": 4,
"SUMMARY": 5,
"INFO": 6,
"STATESET": 7,
}
var SourceEnum_name = map[int32]string{
0: "API",
1: "RULE",
}
var SourceEnum_value = map[string]int32{
"API": 0,
"RULE": 1,
}
Functions ¶
func CopyLabels ¶
func CopyLabels(input []LabelAdapter) labels.Labels
Efficiently copies labels input slice. To be used in cases where input slice can be reused, but long-term copy is needed.
func FloatHistogramProtoToFloatHistogram ¶ added in v1.18.0
func FloatHistogramProtoToFloatHistogram(hp Histogram) *histogram.FloatHistogram
FloatHistogramProtoToFloatHistogram extracts a float Histogram from the provided proto message. The caller has to make sure that the proto message represents a float histogram and not an integer histogram, or it panics. Changed from https://github.com/prometheus/prometheus/blob/0ab95536115adfe50af249d36d73674be694ca3f/storage/remote/codec.go#L647-L667
func FromExemplarProtosToExemplars ¶ added in v1.10.0
func FromLabelAdaptersToLabels ¶
func FromLabelAdaptersToLabels(ls []LabelAdapter) labels.Labels
FromLabelAdaptersToLabels casts []LabelAdapter to labels.Labels. It uses unsafe, but as LabelAdapter == labels.Label this should be safe. This allows us to use labels.Labels directly in protos.
Note: while resulting labels.Labels is supposedly sorted, this function doesn't enforce that. If input is not sorted, output will be wrong.
func FromLabelAdaptersToLabelsWithCopy ¶
func FromLabelAdaptersToLabelsWithCopy(input []LabelAdapter) labels.Labels
FromLabelAdaptersToLabelsWithCopy converts []LabelAdapter to labels.Labels. Do NOT use unsafe to convert between data types because this function may get in input labels whose data structure is reused.
func FromLabelAdaptersToMetric ¶
func FromLabelAdaptersToMetric(ls []LabelAdapter) model.Metric
FromLabelAdaptersToMetric converts []LabelAdapter to a model.Metric. Don't do this on any performance sensitive paths.
func FromLabelAdaptersToMetricWithCopy ¶ added in v1.13.0
func FromLabelAdaptersToMetricWithCopy(ls []LabelAdapter) model.Metric
FromLabelAdaptersToMetric converts []LabelAdapter to a model.Metric with copy. Don't do this on any performance sensitive paths.
func HistogramProtoToHistogram ¶ added in v1.18.0
HistogramProtoToHistogram extracts a (normal integer) Histogram from the provided proto message. The caller has to make sure that the proto message represents an interger histogram and not a float histogram. Changed from https://github.com/prometheus/prometheus/blob/0ab95536115adfe50af249d36d73674be694ca3f/storage/remote/codec.go#L626-L645
func LabelsToFingerprint ¶ added in v1.20.0
func LabelsToFingerprint(lset labels.Labels) model.Fingerprint
func MetricMetadataMetricTypeToMetricType ¶
func MetricMetadataMetricTypeToMetricType(mt MetricMetadata_MetricType) model.MetricType
MetricMetadataMetricTypeToMetricType converts a metric type from our internal client to a Prometheus one.
func ReuseSlice ¶
func ReuseSlice(ts []PreallocTimeseries)
ReuseSlice puts the slice back into a sync.Pool for reuse.
func ReuseSliceV2 ¶ added in v1.20.0
func ReuseSliceV2(ts []PreallocTimeseriesV2)
ReuseSliceV2 puts the slice back into a sync.Pool for reuse.
func ReuseTimeseries ¶
func ReuseTimeseries(ts *TimeSeries)
ReuseTimeseries puts the timeseries back into a sync.Pool for reuse.
func ReuseTimeseriesV2 ¶ added in v1.20.0
func ReuseTimeseriesV2(ts *TimeSeriesV2)
ReuseTimeseriesV2 puts the timeseriesV2 back into a sync.Pool for reuse.
func ReuseWriteRequest ¶ added in v1.15.0
func ReuseWriteRequest(req *PreallocWriteRequest)
func ReuseWriteRequestV2 ¶ added in v1.20.0
func ReuseWriteRequestV2(req *PreallocWriteRequestV2)
Types ¶
type BucketSpan ¶ added in v1.16.0
type BucketSpan struct {
Offset int32 `protobuf:"zigzag32,1,opt,name=offset,proto3" json:"offset,omitempty"`
Length uint32 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"`
}
A BucketSpan defines a number of consecutive buckets with their offset. Logically, it would be more straightforward to include the bucket counts in the Span. However, the protobuf representation is more compact in the way the data is structured here (with all the buckets in a single array separate from the Spans).
func (*BucketSpan) Descriptor ¶ added in v1.16.0
func (*BucketSpan) Descriptor() ([]byte, []int)
func (*BucketSpan) Equal ¶ added in v1.16.0
func (this *BucketSpan) Equal(that interface{}) bool
func (*BucketSpan) GetLength ¶ added in v1.16.0
func (m *BucketSpan) GetLength() uint32
func (*BucketSpan) GetOffset ¶ added in v1.16.0
func (m *BucketSpan) GetOffset() int32
func (*BucketSpan) GoString ¶ added in v1.16.0
func (this *BucketSpan) GoString() string
func (*BucketSpan) Marshal ¶ added in v1.16.0
func (m *BucketSpan) Marshal() (dAtA []byte, err error)
func (*BucketSpan) MarshalTo ¶ added in v1.16.0
func (m *BucketSpan) MarshalTo(dAtA []byte) (int, error)
func (*BucketSpan) MarshalToSizedBuffer ¶ added in v1.16.0
func (m *BucketSpan) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BucketSpan) ProtoMessage ¶ added in v1.16.0
func (*BucketSpan) ProtoMessage()
func (*BucketSpan) Reset ¶ added in v1.16.0
func (m *BucketSpan) Reset()
func (*BucketSpan) Size ¶ added in v1.16.0
func (m *BucketSpan) Size() (n int)
func (*BucketSpan) String ¶ added in v1.16.0
func (this *BucketSpan) String() string
func (*BucketSpan) Unmarshal ¶ added in v1.16.0
func (m *BucketSpan) Unmarshal(dAtA []byte) error
func (*BucketSpan) XXX_DiscardUnknown ¶ added in v1.16.0
func (m *BucketSpan) XXX_DiscardUnknown()
func (*BucketSpan) XXX_Marshal ¶ added in v1.16.0
func (m *BucketSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BucketSpan) XXX_Merge ¶ added in v1.16.0
func (m *BucketSpan) XXX_Merge(src proto.Message)
func (*BucketSpan) XXX_Size ¶ added in v1.16.0
func (m *BucketSpan) XXX_Size() int
func (*BucketSpan) XXX_Unmarshal ¶ added in v1.16.0
func (m *BucketSpan) XXX_Unmarshal(b []byte) error
type Exemplar ¶ added in v1.10.0
type Exemplar struct {
// Exemplar labels, different than series labels
Labels []LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=LabelAdapter" json:"labels"`
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
}
func FromExemplarsToExemplarProtos ¶ added in v1.10.0
func (*Exemplar) Descriptor ¶ added in v1.10.0
func (*Exemplar) GetTimestampMs ¶ added in v1.10.0
func (*Exemplar) MarshalToSizedBuffer ¶ added in v1.10.0
func (*Exemplar) ProtoMessage ¶ added in v1.10.0
func (*Exemplar) ProtoMessage()
func (*Exemplar) XXX_DiscardUnknown ¶ added in v1.10.0
func (m *Exemplar) XXX_DiscardUnknown()
func (*Exemplar) XXX_Marshal ¶ added in v1.10.0
func (*Exemplar) XXX_Unmarshal ¶ added in v1.10.0
type ExemplarV2 ¶ added in v1.20.0
type ExemplarV2 struct {
// labels_refs is an optional list of label name-value pair references, encoded
// as indices to the Request.symbols array. This list's len is always
// a multiple of 2, and the underlying labels should be sorted lexicographically.
// If the exemplar references a trace it should use the `trace_id` label name, as a best practice.
LabelsRefs []uint32 `protobuf:"varint,1,rep,packed,name=labels_refs,json=labelsRefs,proto3" json:"labels_refs,omitempty"`
// value represents an exact example value. This can be useful when the exemplar
// is attached to a histogram, which only gives an estimated value through buckets.
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
// timestamp represents the timestamp of the exemplar in ms.
//
// For Go, see github.com/prometheus/prometheus/model/timestamp/timestamp.go
// for conversion from/to time.Time to Prometheus timestamp.
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
Exemplar is an additional information attached to some series' samples. It is typically used to attach an example trace or request ID associated with the metric changes.
func (*ExemplarV2) Descriptor ¶ added in v1.20.0
func (*ExemplarV2) Descriptor() ([]byte, []int)
func (*ExemplarV2) Equal ¶ added in v1.20.0
func (this *ExemplarV2) Equal(that interface{}) bool
func (*ExemplarV2) GetLabelsRefs ¶ added in v1.20.0
func (m *ExemplarV2) GetLabelsRefs() []uint32
func (*ExemplarV2) GetTimestamp ¶ added in v1.20.0
func (m *ExemplarV2) GetTimestamp() int64
func (*ExemplarV2) GetValue ¶ added in v1.20.0
func (m *ExemplarV2) GetValue() float64
func (*ExemplarV2) GoString ¶ added in v1.20.0
func (this *ExemplarV2) GoString() string
func (*ExemplarV2) Marshal ¶ added in v1.20.0
func (m *ExemplarV2) Marshal() (dAtA []byte, err error)
func (*ExemplarV2) MarshalTo ¶ added in v1.20.0
func (m *ExemplarV2) MarshalTo(dAtA []byte) (int, error)
func (*ExemplarV2) MarshalToSizedBuffer ¶ added in v1.20.0
func (m *ExemplarV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ExemplarV2) ProtoMessage ¶ added in v1.20.0
func (*ExemplarV2) ProtoMessage()
func (*ExemplarV2) Reset ¶ added in v1.20.0
func (m *ExemplarV2) Reset()
func (*ExemplarV2) Size ¶ added in v1.20.0
func (m *ExemplarV2) Size() (n int)
func (*ExemplarV2) String ¶ added in v1.20.0
func (this *ExemplarV2) String() string
func (*ExemplarV2) ToLabels ¶ added in v1.20.0
func (e *ExemplarV2) ToLabels(b *labels.ScratchBuilder, symbols []string) labels.Labels
func (*ExemplarV2) Unmarshal ¶ added in v1.20.0
func (m *ExemplarV2) Unmarshal(dAtA []byte) error
func (*ExemplarV2) XXX_DiscardUnknown ¶ added in v1.20.0
func (m *ExemplarV2) XXX_DiscardUnknown()
func (*ExemplarV2) XXX_Marshal ¶ added in v1.20.0
func (m *ExemplarV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExemplarV2) XXX_Merge ¶ added in v1.20.0
func (m *ExemplarV2) XXX_Merge(src proto.Message)
func (*ExemplarV2) XXX_Size ¶ added in v1.20.0
func (m *ExemplarV2) XXX_Size() int
func (*ExemplarV2) XXX_Unmarshal ¶ added in v1.20.0
func (m *ExemplarV2) XXX_Unmarshal(b []byte) error
type GogoProtoMessage ¶ added in v1.20.0
type Histogram ¶ added in v1.16.0
type Histogram struct {
// Types that are valid to be assigned to Count:
//
// *Histogram_CountInt
// *Histogram_CountFloat
Count isHistogram_Count `protobuf_oneof:"count"`
Sum float64 `protobuf:"fixed64,3,opt,name=sum,proto3" json:"sum,omitempty"`
// The schema defines the bucket schema. Currently, valid numbers
// are -4 <= n <= 8. They are all for base-2 bucket schemas, where 1
// is a bucket boundary in each case, and then each power of two is
// divided into 2^n logarithmic buckets. Or in other words, each
// bucket boundary is the previous boundary times 2^(2^-n). In the
// future, more bucket schemas may be added using numbers < -4 or >
// 8.
Schema int32 `protobuf:"zigzag32,4,opt,name=schema,proto3" json:"schema,omitempty"`
ZeroThreshold float64 `protobuf:"fixed64,5,opt,name=zero_threshold,json=zeroThreshold,proto3" json:"zero_threshold,omitempty"`
// Types that are valid to be assigned to ZeroCount:
//
// *Histogram_ZeroCountInt
// *Histogram_ZeroCountFloat
ZeroCount isHistogram_ZeroCount `protobuf_oneof:"zero_count"`
// Negative Buckets.
NegativeSpans []BucketSpan `protobuf:"bytes,8,rep,name=negative_spans,json=negativeSpans,proto3" json:"negative_spans"`
// Use either "negative_deltas" or "negative_counts", the former for
// regular histograms with integer counts, the latter for float
// histograms.
NegativeDeltas []int64 `protobuf:"zigzag64,9,rep,packed,name=negative_deltas,json=negativeDeltas,proto3" json:"negative_deltas,omitempty"`
NegativeCounts []float64 `protobuf:"fixed64,10,rep,packed,name=negative_counts,json=negativeCounts,proto3" json:"negative_counts,omitempty"`
// Positive Buckets.
PositiveSpans []BucketSpan `protobuf:"bytes,11,rep,name=positive_spans,json=positiveSpans,proto3" json:"positive_spans"`
// Use either "positive_deltas" or "positive_counts", the former for
// regular histograms with integer counts, the latter for float
// histograms.
PositiveDeltas []int64 `protobuf:"zigzag64,12,rep,packed,name=positive_deltas,json=positiveDeltas,proto3" json:"positive_deltas,omitempty"`
PositiveCounts []float64 `protobuf:"fixed64,13,rep,packed,name=positive_counts,json=positiveCounts,proto3" json:"positive_counts,omitempty"`
ResetHint Histogram_ResetHint `protobuf:"varint,14,opt,name=reset_hint,json=resetHint,proto3,enum=cortexpb.Histogram_ResetHint" json:"reset_hint,omitempty"`
// timestamp is in ms format, see model/timestamp/timestamp.go for
// conversion from time.Time to Prometheus timestamp.
TimestampMs int64 `protobuf:"varint,15,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
}
A native histogram, also known as a sparse histogram. Original design doc: https://docs.google.com/document/d/1cLNv3aufPZb3fNfaJgdaRBZsInZKKIHo9E6HinJVbpM/edit The appendix of this design doc also explains the concept of float histograms. This Histogram message can represent both, the usual integer histogram as well as a float histogram.
func FloatHistogramToHistogramProto ¶ added in v1.18.0
func FloatHistogramToHistogramProto(timestamp int64, fh *histogram.FloatHistogram) Histogram
FloatHistogramToHistogramProto converts a float Histogram to a normal Histogram's protobuf message type. Changed from https://github.com/prometheus/prometheus/blob/0ab95536115adfe50af249d36d73674be694ca3f/storage/remote/codec.go#L725-L739
func HistogramPromProtoToHistogramProto ¶ added in v1.18.0
HistogramPromProtoToHistogramProto converts a prometheus protobuf Histogram to cortex protobuf Histogram.
func HistogramToHistogramProto ¶ added in v1.18.0
HistogramToHistogramProto converts a (normal integer) Histogram to its protobuf message type. Changed from https://github.com/prometheus/prometheus/blob/0ab95536115adfe50af249d36d73674be694ca3f/storage/remote/codec.go#L709-L723
func (*Histogram) Descriptor ¶ added in v1.16.0
func (*Histogram) GetCountFloat ¶ added in v1.16.0
func (*Histogram) GetCountInt ¶ added in v1.16.0
func (*Histogram) GetNegativeCounts ¶ added in v1.16.0
func (*Histogram) GetNegativeDeltas ¶ added in v1.16.0
func (*Histogram) GetNegativeSpans ¶ added in v1.16.0
func (m *Histogram) GetNegativeSpans() []BucketSpan
func (*Histogram) GetPositiveCounts ¶ added in v1.16.0
func (*Histogram) GetPositiveDeltas ¶ added in v1.16.0
func (*Histogram) GetPositiveSpans ¶ added in v1.16.0
func (m *Histogram) GetPositiveSpans() []BucketSpan
func (*Histogram) GetResetHint ¶ added in v1.16.0
func (m *Histogram) GetResetHint() Histogram_ResetHint
func (*Histogram) GetTimestampMs ¶ added in v1.16.0
func (*Histogram) GetZeroCount ¶ added in v1.16.0
func (m *Histogram) GetZeroCount() isHistogram_ZeroCount
func (*Histogram) GetZeroCountFloat ¶ added in v1.16.0
func (*Histogram) GetZeroCountInt ¶ added in v1.16.0
func (*Histogram) GetZeroThreshold ¶ added in v1.16.0
func (Histogram) IsFloatHistogram ¶ added in v1.18.0
func (*Histogram) MarshalToSizedBuffer ¶ added in v1.16.0
func (*Histogram) ProtoMessage ¶ added in v1.16.0
func (*Histogram) ProtoMessage()
func (*Histogram) XXX_DiscardUnknown ¶ added in v1.16.0
func (m *Histogram) XXX_DiscardUnknown()
func (*Histogram) XXX_Marshal ¶ added in v1.16.0
func (*Histogram) XXX_OneofWrappers ¶ added in v1.16.0
func (*Histogram) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Histogram) XXX_Unmarshal ¶ added in v1.16.0
type Histogram_CountFloat ¶ added in v1.16.0
type Histogram_CountFloat struct {
CountFloat float64 `protobuf:"fixed64,2,opt,name=count_float,json=countFloat,proto3,oneof"`
}
func (*Histogram_CountFloat) Equal ¶ added in v1.16.0
func (this *Histogram_CountFloat) Equal(that interface{}) bool
func (*Histogram_CountFloat) GoString ¶ added in v1.16.0
func (this *Histogram_CountFloat) GoString() string
func (*Histogram_CountFloat) MarshalTo ¶ added in v1.16.0
func (m *Histogram_CountFloat) MarshalTo(dAtA []byte) (int, error)
func (*Histogram_CountFloat) MarshalToSizedBuffer ¶ added in v1.16.0
func (m *Histogram_CountFloat) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Histogram_CountFloat) Size ¶ added in v1.16.0
func (m *Histogram_CountFloat) Size() (n int)
func (*Histogram_CountFloat) String ¶ added in v1.16.0
func (this *Histogram_CountFloat) String() string
type Histogram_CountInt ¶ added in v1.16.0
type Histogram_CountInt struct {
CountInt uint64 `protobuf:"varint,1,opt,name=count_int,json=countInt,proto3,oneof"`
}
func (*Histogram_CountInt) Equal ¶ added in v1.16.0
func (this *Histogram_CountInt) Equal(that interface{}) bool
func (*Histogram_CountInt) GoString ¶ added in v1.16.0
func (this *Histogram_CountInt) GoString() string
func (*Histogram_CountInt) MarshalTo ¶ added in v1.16.0
func (m *Histogram_CountInt) MarshalTo(dAtA []byte) (int, error)
func (*Histogram_CountInt) MarshalToSizedBuffer ¶ added in v1.16.0
func (m *Histogram_CountInt) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Histogram_CountInt) Size ¶ added in v1.16.0
func (m *Histogram_CountInt) Size() (n int)
func (*Histogram_CountInt) String ¶ added in v1.16.0
func (this *Histogram_CountInt) String() string
type Histogram_ResetHint ¶ added in v1.16.0
type Histogram_ResetHint int32
const ( Histogram_UNKNOWN Histogram_ResetHint = 0 Histogram_YES Histogram_ResetHint = 1 Histogram_NO Histogram_ResetHint = 2 Histogram_GAUGE Histogram_ResetHint = 3 )
func (Histogram_ResetHint) EnumDescriptor ¶ added in v1.16.0
func (Histogram_ResetHint) EnumDescriptor() ([]byte, []int)
func (Histogram_ResetHint) String ¶ added in v1.16.0
func (x Histogram_ResetHint) String() string
type Histogram_ZeroCountFloat ¶ added in v1.16.0
type Histogram_ZeroCountFloat struct {
ZeroCountFloat float64 `protobuf:"fixed64,7,opt,name=zero_count_float,json=zeroCountFloat,proto3,oneof"`
}
func (*Histogram_ZeroCountFloat) Equal ¶ added in v1.16.0
func (this *Histogram_ZeroCountFloat) Equal(that interface{}) bool
func (*Histogram_ZeroCountFloat) GoString ¶ added in v1.16.0
func (this *Histogram_ZeroCountFloat) GoString() string
func (*Histogram_ZeroCountFloat) MarshalTo ¶ added in v1.16.0
func (m *Histogram_ZeroCountFloat) MarshalTo(dAtA []byte) (int, error)
func (*Histogram_ZeroCountFloat) MarshalToSizedBuffer ¶ added in v1.16.0
func (m *Histogram_ZeroCountFloat) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Histogram_ZeroCountFloat) Size ¶ added in v1.16.0
func (m *Histogram_ZeroCountFloat) Size() (n int)
func (*Histogram_ZeroCountFloat) String ¶ added in v1.16.0
func (this *Histogram_ZeroCountFloat) String() string
type Histogram_ZeroCountInt ¶ added in v1.16.0
type Histogram_ZeroCountInt struct {
ZeroCountInt uint64 `protobuf:"varint,6,opt,name=zero_count_int,json=zeroCountInt,proto3,oneof"`
}
func (*Histogram_ZeroCountInt) Equal ¶ added in v1.16.0
func (this *Histogram_ZeroCountInt) Equal(that interface{}) bool
func (*Histogram_ZeroCountInt) GoString ¶ added in v1.16.0
func (this *Histogram_ZeroCountInt) GoString() string
func (*Histogram_ZeroCountInt) MarshalTo ¶ added in v1.16.0
func (m *Histogram_ZeroCountInt) MarshalTo(dAtA []byte) (int, error)
func (*Histogram_ZeroCountInt) MarshalToSizedBuffer ¶ added in v1.16.0
func (m *Histogram_ZeroCountInt) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Histogram_ZeroCountInt) Size ¶ added in v1.16.0
func (m *Histogram_ZeroCountInt) Size() (n int)
func (*Histogram_ZeroCountInt) String ¶ added in v1.16.0
func (this *Histogram_ZeroCountInt) String() string
type LabelAdapter ¶
LabelAdapter is a labels.Label that can be marshalled to/from protos.
func FromLabelsToLabelAdapters ¶
func FromLabelsToLabelAdapters(ls labels.Labels) []LabelAdapter
FromLabelsToLabelAdapters casts labels.Labels to []LabelAdapter. It uses unsafe, but as LabelAdapter == labels.Label this should be safe. This allows us to use labels.Labels directly in protos.
func FromMetricsToLabelAdapters ¶
func FromMetricsToLabelAdapters(metric model.Metric) []LabelAdapter
FromMetricsToLabelAdapters converts model.Metric to []LabelAdapter. Don't do this on any performance sensitive paths. The result is sorted.
func (*LabelAdapter) Compare ¶
func (bs *LabelAdapter) Compare(other LabelAdapter) int
Compare implements proto.Comparer.
func (*LabelAdapter) Equal ¶
func (bs *LabelAdapter) Equal(other LabelAdapter) bool
Equal implements proto.Equaler.
func (*LabelAdapter) Marshal ¶
func (bs *LabelAdapter) Marshal() ([]byte, error)
Marshal implements proto.Marshaller.
func (*LabelAdapter) MarshalToSizedBuffer ¶
func (bs *LabelAdapter) MarshalToSizedBuffer(buf []byte) (n int, err error)
MarshalTo implements proto.Marshaller.
func (*LabelAdapter) Unmarshal ¶
func (bs *LabelAdapter) Unmarshal(dAtA []byte) error
Unmarshal a LabelAdapter, implements proto.Unmarshaller. NB this is a copy of the autogenerated code to unmarshal a LabelPair, with the byte copying replaced with a yoloString.
type LabelPair ¶
type LabelPair struct {
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (*LabelPair) Descriptor ¶
func (*LabelPair) MarshalToSizedBuffer ¶
func (*LabelPair) ProtoMessage ¶
func (*LabelPair) ProtoMessage()
func (*LabelPair) XXX_DiscardUnknown ¶
func (m *LabelPair) XXX_DiscardUnknown()
func (*LabelPair) XXX_Marshal ¶
func (*LabelPair) XXX_Unmarshal ¶
type MessageWithBufRef ¶ added in v1.20.0
type MessageWithBufRef struct {
// contains filtered or unexported fields
}
func (*MessageWithBufRef) Descriptor ¶ added in v1.20.0
func (*MessageWithBufRef) Descriptor() ([]byte, []int)
func (*MessageWithBufRef) Equal ¶ added in v1.20.0
func (this *MessageWithBufRef) Equal(that interface{}) bool
func (*MessageWithBufRef) Free ¶ added in v1.20.0
func (m *MessageWithBufRef) Free()
func (*MessageWithBufRef) GoString ¶ added in v1.20.0
func (this *MessageWithBufRef) GoString() string
func (*MessageWithBufRef) Marshal ¶ added in v1.20.0
func (m *MessageWithBufRef) Marshal() (dAtA []byte, err error)
func (*MessageWithBufRef) MarshalTo ¶ added in v1.20.0
func (m *MessageWithBufRef) MarshalTo(dAtA []byte) (int, error)
func (*MessageWithBufRef) MarshalToSizedBuffer ¶ added in v1.20.0
func (m *MessageWithBufRef) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MessageWithBufRef) ProtoMessage ¶ added in v1.20.0
func (*MessageWithBufRef) ProtoMessage()
func (*MessageWithBufRef) RegisterBuffer ¶ added in v1.20.0
func (m *MessageWithBufRef) RegisterBuffer(buffer mem.Buffer)
func (*MessageWithBufRef) Reset ¶ added in v1.20.0
func (m *MessageWithBufRef) Reset()
func (*MessageWithBufRef) Size ¶ added in v1.20.0
func (m *MessageWithBufRef) Size() (n int)
func (*MessageWithBufRef) String ¶ added in v1.20.0
func (this *MessageWithBufRef) String() string
func (*MessageWithBufRef) Unmarshal ¶ added in v1.20.0
func (m *MessageWithBufRef) Unmarshal(dAtA []byte) error
func (*MessageWithBufRef) XXX_DiscardUnknown ¶ added in v1.20.0
func (m *MessageWithBufRef) XXX_DiscardUnknown()
func (*MessageWithBufRef) XXX_Marshal ¶ added in v1.20.0
func (m *MessageWithBufRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MessageWithBufRef) XXX_Merge ¶ added in v1.20.0
func (m *MessageWithBufRef) XXX_Merge(src proto.Message)
func (*MessageWithBufRef) XXX_Size ¶ added in v1.20.0
func (m *MessageWithBufRef) XXX_Size() int
func (*MessageWithBufRef) XXX_Unmarshal ¶ added in v1.20.0
func (m *MessageWithBufRef) XXX_Unmarshal(b []byte) error
type MetadataV2 ¶ added in v1.20.0
type MetadataV2 struct {
Type MetadataV2_MetricType `protobuf:"varint,1,opt,name=type,proto3,enum=cortexpb.MetadataV2_MetricType" json:"type,omitempty"`
// help_ref is a reference to the Request.symbols array representing help
// text for the metric. Help is optional, reference should point to an empty string in
// such a case.
HelpRef uint32 `protobuf:"varint,3,opt,name=help_ref,json=helpRef,proto3" json:"help_ref,omitempty"`
// unit_ref is a reference to the Request.symbols array representing a unit
// for the metric. Unit is optional, reference should point to an empty string in
// such a case.
UnitRef uint32 `protobuf:"varint,4,opt,name=unit_ref,json=unitRef,proto3" json:"unit_ref,omitempty"`
}
Metadata represents the metadata associated with the given series' samples.
func (*MetadataV2) Descriptor ¶ added in v1.20.0
func (*MetadataV2) Descriptor() ([]byte, []int)
func (*MetadataV2) Equal ¶ added in v1.20.0
func (this *MetadataV2) Equal(that interface{}) bool
func (*MetadataV2) GetHelpRef ¶ added in v1.20.0
func (m *MetadataV2) GetHelpRef() uint32
func (*MetadataV2) GetType ¶ added in v1.20.0
func (m *MetadataV2) GetType() MetadataV2_MetricType
func (*MetadataV2) GetUnitRef ¶ added in v1.20.0
func (m *MetadataV2) GetUnitRef() uint32
func (*MetadataV2) GoString ¶ added in v1.20.0
func (this *MetadataV2) GoString() string
func (*MetadataV2) Marshal ¶ added in v1.20.0
func (m *MetadataV2) Marshal() (dAtA []byte, err error)
func (*MetadataV2) MarshalTo ¶ added in v1.20.0
func (m *MetadataV2) MarshalTo(dAtA []byte) (int, error)
func (*MetadataV2) MarshalToSizedBuffer ¶ added in v1.20.0
func (m *MetadataV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MetadataV2) ProtoMessage ¶ added in v1.20.0
func (*MetadataV2) ProtoMessage()
func (*MetadataV2) Reset ¶ added in v1.20.0
func (m *MetadataV2) Reset()
func (*MetadataV2) Size ¶ added in v1.20.0
func (m *MetadataV2) Size() (n int)
func (*MetadataV2) String ¶ added in v1.20.0
func (this *MetadataV2) String() string
func (*MetadataV2) Unmarshal ¶ added in v1.20.0
func (m *MetadataV2) Unmarshal(dAtA []byte) error
func (*MetadataV2) XXX_DiscardUnknown ¶ added in v1.20.0
func (m *MetadataV2) XXX_DiscardUnknown()
func (*MetadataV2) XXX_Marshal ¶ added in v1.20.0
func (m *MetadataV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetadataV2) XXX_Merge ¶ added in v1.20.0
func (m *MetadataV2) XXX_Merge(src proto.Message)
func (*MetadataV2) XXX_Size ¶ added in v1.20.0
func (m *MetadataV2) XXX_Size() int
func (*MetadataV2) XXX_Unmarshal ¶ added in v1.20.0
func (m *MetadataV2) XXX_Unmarshal(b []byte) error
type MetadataV2_MetricType ¶ added in v1.20.0
type MetadataV2_MetricType int32
const ( METRIC_TYPE_UNSPECIFIED MetadataV2_MetricType = 0 METRIC_TYPE_COUNTER MetadataV2_MetricType = 1 METRIC_TYPE_GAUGE MetadataV2_MetricType = 2 METRIC_TYPE_HISTOGRAM MetadataV2_MetricType = 3 METRIC_TYPE_GAUGEHISTOGRAM MetadataV2_MetricType = 4 METRIC_TYPE_SUMMARY MetadataV2_MetricType = 5 METRIC_TYPE_INFO MetadataV2_MetricType = 6 METRIC_TYPE_STATESET MetadataV2_MetricType = 7 )
func (MetadataV2_MetricType) EnumDescriptor ¶ added in v1.20.0
func (MetadataV2_MetricType) EnumDescriptor() ([]byte, []int)
func (MetadataV2_MetricType) String ¶ added in v1.20.0
func (x MetadataV2_MetricType) String() string
type Metric ¶
type Metric struct {
Labels []LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=LabelAdapter" json:"labels"`
}
func (*Metric) Descriptor ¶
func (*Metric) MarshalToSizedBuffer ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) XXX_DiscardUnknown ¶
func (m *Metric) XXX_DiscardUnknown()
func (*Metric) XXX_Marshal ¶
func (*Metric) XXX_Unmarshal ¶
type MetricMetadata ¶
type MetricMetadata struct {
Type MetricMetadata_MetricType `protobuf:"varint,1,opt,name=type,proto3,enum=cortexpb.MetricMetadata_MetricType" json:"type,omitempty"`
MetricFamilyName string `protobuf:"bytes,2,opt,name=metric_family_name,json=metricFamilyName,proto3" json:"metric_family_name,omitempty"`
Help string `protobuf:"bytes,4,opt,name=help,proto3" json:"help,omitempty"`
Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
}
func (*MetricMetadata) Descriptor ¶
func (*MetricMetadata) Descriptor() ([]byte, []int)
func (*MetricMetadata) Equal ¶
func (this *MetricMetadata) Equal(that interface{}) bool
func (*MetricMetadata) GetHelp ¶
func (m *MetricMetadata) GetHelp() string
func (*MetricMetadata) GetMetricFamilyName ¶
func (m *MetricMetadata) GetMetricFamilyName() string
func (*MetricMetadata) GetType ¶
func (m *MetricMetadata) GetType() MetricMetadata_MetricType
func (*MetricMetadata) GetUnit ¶
func (m *MetricMetadata) GetUnit() string
func (*MetricMetadata) GoString ¶
func (this *MetricMetadata) GoString() string
func (*MetricMetadata) Marshal ¶
func (m *MetricMetadata) Marshal() (dAtA []byte, err error)
func (*MetricMetadata) MarshalToSizedBuffer ¶
func (m *MetricMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MetricMetadata) ProtoMessage ¶
func (*MetricMetadata) ProtoMessage()
func (*MetricMetadata) Reset ¶
func (m *MetricMetadata) Reset()
func (*MetricMetadata) Size ¶
func (m *MetricMetadata) Size() (n int)
func (*MetricMetadata) String ¶
func (this *MetricMetadata) String() string
func (*MetricMetadata) Unmarshal ¶
func (m *MetricMetadata) Unmarshal(dAtA []byte) error
func (*MetricMetadata) XXX_DiscardUnknown ¶
func (m *MetricMetadata) XXX_DiscardUnknown()
func (*MetricMetadata) XXX_Marshal ¶
func (m *MetricMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetricMetadata) XXX_Merge ¶
func (m *MetricMetadata) XXX_Merge(src proto.Message)
func (*MetricMetadata) XXX_Size ¶
func (m *MetricMetadata) XXX_Size() int
func (*MetricMetadata) XXX_Unmarshal ¶
func (m *MetricMetadata) XXX_Unmarshal(b []byte) error
type MetricMetadata_MetricType ¶
type MetricMetadata_MetricType int32
const ( UNKNOWN MetricMetadata_MetricType = 0 COUNTER MetricMetadata_MetricType = 1 GAUGE MetricMetadata_MetricType = 2 HISTOGRAM MetricMetadata_MetricType = 3 GAUGEHISTOGRAM MetricMetadata_MetricType = 4 SUMMARY MetricMetadata_MetricType = 5 INFO MetricMetadata_MetricType = 6 STATESET MetricMetadata_MetricType = 7 )
func (MetricMetadata_MetricType) EnumDescriptor ¶
func (MetricMetadata_MetricType) EnumDescriptor() ([]byte, []int)
func (MetricMetadata_MetricType) String ¶
func (x MetricMetadata_MetricType) String() string
type PreallocConfig ¶
type PreallocConfig struct{}
PreallocConfig configures how structures will be preallocated to optimise proto unmarshalling.
func (PreallocConfig) RegisterFlags ¶
func (PreallocConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags registers configuration settings.
type PreallocTimeseries ¶
type PreallocTimeseries struct {
*TimeSeries
}
PreallocTimeseries is a TimeSeries which preallocs slices on Unmarshal.
func PreallocTimeseriesSliceFromPool ¶
func PreallocTimeseriesSliceFromPool() []PreallocTimeseries
PreallocTimeseriesSliceFromPool retrieves a slice of PreallocTimeseries from a sync.Pool. ReuseSlice should be called once done.
func (*PreallocTimeseries) Unmarshal ¶
func (p *PreallocTimeseries) Unmarshal(dAtA []byte) error
Unmarshal implements proto.Message.
type PreallocTimeseriesV2 ¶ added in v1.20.0
type PreallocTimeseriesV2 struct {
*TimeSeriesV2
}
PreallocTimeseriesV2 is a TimeSeries which preallocs slices on Unmarshal.
func PreallocTimeseriesV2SliceFromPool ¶ added in v1.20.0
func PreallocTimeseriesV2SliceFromPool() []PreallocTimeseriesV2
PreallocTimeseriesV2SliceFromPool retrieves a slice of PreallocTimeseriesV2 from a sync.Pool. ReuseSliceV2 should be called once done.
func (*PreallocTimeseriesV2) Unmarshal ¶ added in v1.20.0
func (p *PreallocTimeseriesV2) Unmarshal(dAtA []byte) error
Unmarshal implements proto.Message.
type PreallocWriteRequest ¶
type PreallocWriteRequest struct {
WriteRequest
// contains filtered or unexported fields
}
PreallocWriteRequest is a WriteRequest which preallocs slices on Unmarshal.
func PreallocWriteRequestFromPool ¶ added in v1.15.0
func PreallocWriteRequestFromPool() *PreallocWriteRequest
func (*PreallocWriteRequest) Marshal ¶ added in v1.15.0
func (p *PreallocWriteRequest) Marshal() (dAtA []byte, err error)
func (*PreallocWriteRequest) Unmarshal ¶
func (p *PreallocWriteRequest) Unmarshal(dAtA []byte) error
Unmarshal implements proto.Message.
type PreallocWriteRequestV2 ¶ added in v1.20.0
type PreallocWriteRequestV2 struct {
WriteRequestV2
// contains filtered or unexported fields
}
PreallocWriteRequestV2 is a WriteRequestV2 which preallocs slices on Unmarshal.
func PreallocWriteRequestV2FromPool ¶ added in v1.20.0
func PreallocWriteRequestV2FromPool() *PreallocWriteRequestV2
func (*PreallocWriteRequestV2) Marshal ¶ added in v1.20.0
func (p *PreallocWriteRequestV2) Marshal() (dAtA []byte, err error)
func (*PreallocWriteRequestV2) Unmarshal ¶ added in v1.20.0
func (p *PreallocWriteRequestV2) Unmarshal(dAtA []byte) error
Unmarshal implements proto.Message.
type ReleasableMessage ¶ added in v1.20.0
type Sample ¶
type Sample struct {
Value float64 `protobuf:"fixed64,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 (*Sample) Descriptor ¶
func (*Sample) GetTimestampMs ¶
func (Sample) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Sample) MarshalToSizedBuffer ¶
func (*Sample) ProtoMessage ¶
func (*Sample) ProtoMessage()
func (*Sample) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Sample) XXX_DiscardUnknown ¶
func (m *Sample) XXX_DiscardUnknown()
func (*Sample) XXX_Marshal ¶
func (*Sample) XXX_Unmarshal ¶
type SourceEnum ¶ added in v1.20.0
type SourceEnum int32
const ( API SourceEnum = 0 RULE SourceEnum = 1 )
func (SourceEnum) EnumDescriptor ¶ added in v1.20.0
func (SourceEnum) EnumDescriptor() ([]byte, []int)
func (SourceEnum) String ¶ added in v1.20.0
func (x SourceEnum) String() string
type StreamWriteRequest ¶ added in v1.20.0
type StreamWriteRequest struct {
TenantID string `protobuf:"bytes,1,opt,name=TenantID,proto3" json:"TenantID,omitempty"`
Request *WriteRequest `protobuf:"bytes,2,opt,name=Request,proto3" json:"Request,omitempty"`
MessageWithBufRef `protobuf:"bytes,1000,opt,name=Ref,proto3,embedded=Ref,customtype=MessageWithBufRef" json:"Ref"`
}
func (*StreamWriteRequest) Descriptor ¶ added in v1.20.0
func (*StreamWriteRequest) Descriptor() ([]byte, []int)
func (*StreamWriteRequest) Equal ¶ added in v1.20.0
func (this *StreamWriteRequest) Equal(that interface{}) bool
func (*StreamWriteRequest) GetRequest ¶ added in v1.20.0
func (m *StreamWriteRequest) GetRequest() *WriteRequest
func (*StreamWriteRequest) GetTenantID ¶ added in v1.20.0
func (m *StreamWriteRequest) GetTenantID() string
func (*StreamWriteRequest) GoString ¶ added in v1.20.0
func (this *StreamWriteRequest) GoString() string
func (*StreamWriteRequest) Marshal ¶ added in v1.20.0
func (m *StreamWriteRequest) Marshal() (dAtA []byte, err error)
func (*StreamWriteRequest) MarshalTo ¶ added in v1.20.0
func (m *StreamWriteRequest) MarshalTo(dAtA []byte) (int, error)
func (*StreamWriteRequest) MarshalToSizedBuffer ¶ added in v1.20.0
func (m *StreamWriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StreamWriteRequest) ProtoMessage ¶ added in v1.20.0
func (*StreamWriteRequest) ProtoMessage()
func (*StreamWriteRequest) Reset ¶ added in v1.20.0
func (m *StreamWriteRequest) Reset()
func (*StreamWriteRequest) Size ¶ added in v1.20.0
func (m *StreamWriteRequest) Size() (n int)
func (*StreamWriteRequest) String ¶ added in v1.20.0
func (this *StreamWriteRequest) String() string
func (*StreamWriteRequest) Unmarshal ¶ added in v1.20.0
func (m *StreamWriteRequest) Unmarshal(dAtA []byte) error
func (*StreamWriteRequest) XXX_DiscardUnknown ¶ added in v1.20.0
func (m *StreamWriteRequest) XXX_DiscardUnknown()
func (*StreamWriteRequest) XXX_Marshal ¶ added in v1.20.0
func (m *StreamWriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamWriteRequest) XXX_Merge ¶ added in v1.20.0
func (m *StreamWriteRequest) XXX_Merge(src proto.Message)
func (*StreamWriteRequest) XXX_Size ¶ added in v1.20.0
func (m *StreamWriteRequest) XXX_Size() int
func (*StreamWriteRequest) XXX_Unmarshal ¶ added in v1.20.0
func (m *StreamWriteRequest) XXX_Unmarshal(b []byte) error
type TimeSeries ¶
type TimeSeries struct {
Labels []LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=LabelAdapter" json:"labels"`
// Sorted by time, oldest sample first.
Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"`
Exemplars []Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars"`
Histograms []Histogram `protobuf:"bytes,4,rep,name=histograms,proto3" json:"histograms"`
}
func TimeseriesFromPool ¶
func TimeseriesFromPool() *TimeSeries
TimeseriesFromPool retrieves a pointer to a TimeSeries from a sync.Pool. ReuseTimeseries should be called once done, unless ReuseSlice was called on the slice that contains this TimeSeries.
func (*TimeSeries) Descriptor ¶
func (*TimeSeries) Descriptor() ([]byte, []int)
func (*TimeSeries) Equal ¶
func (this *TimeSeries) Equal(that interface{}) bool
func (*TimeSeries) GetExemplars ¶ added in v1.10.0
func (m *TimeSeries) GetExemplars() []Exemplar
func (*TimeSeries) GetHistograms ¶ added in v1.16.0
func (m *TimeSeries) GetHistograms() []Histogram
func (*TimeSeries) GetSamples ¶
func (m *TimeSeries) GetSamples() []Sample
func (*TimeSeries) GoString ¶
func (this *TimeSeries) GoString() string
func (*TimeSeries) Marshal ¶
func (m *TimeSeries) Marshal() (dAtA []byte, err error)
func (*TimeSeries) MarshalToSizedBuffer ¶
func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TimeSeries) ProtoMessage ¶
func (*TimeSeries) ProtoMessage()
func (*TimeSeries) Reset ¶
func (m *TimeSeries) Reset()
func (*TimeSeries) Size ¶
func (m *TimeSeries) Size() (n int)
func (*TimeSeries) String ¶
func (this *TimeSeries) String() string
func (*TimeSeries) Unmarshal ¶
func (m *TimeSeries) Unmarshal(dAtA []byte) error
func (*TimeSeries) XXX_DiscardUnknown ¶
func (m *TimeSeries) XXX_DiscardUnknown()
func (*TimeSeries) XXX_Marshal ¶
func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeSeries) XXX_Merge ¶
func (m *TimeSeries) XXX_Merge(src proto.Message)
func (*TimeSeries) XXX_Size ¶
func (m *TimeSeries) XXX_Size() int
func (*TimeSeries) XXX_Unmarshal ¶
func (m *TimeSeries) XXX_Unmarshal(b []byte) error
type TimeSeriesV2 ¶ added in v1.20.0
type TimeSeriesV2 struct {
LabelsRefs []uint32 `protobuf:"varint,1,rep,packed,name=labels_refs,json=labelsRefs,proto3" json:"labels_refs,omitempty"`
// Timeseries messages can either specify samples or (native) histogram samples
// (histogram field), but not both. For a typical sender (real-time metric
// streaming), in healthy cases, there will be only one sample or histogram.
//
// Samples and histograms are sorted by timestamp (older first).
Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"`
Histograms []Histogram `protobuf:"bytes,3,rep,name=histograms,proto3" json:"histograms"`
// exemplars represents an optional set of exemplars attached to this series' samples.
Exemplars []ExemplarV2 `protobuf:"bytes,4,rep,name=exemplars,proto3" json:"exemplars"`
// metadata represents the metadata associated with the given series' samples.
Metadata MetadataV2 `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"`
// created_timestamp represents an optional created timestamp associated with
// this series' samples in ms format, typically for counter or histogram type
// metrics. Created timestamp represents the time when the counter started
// counting (sometimes referred to as start timestamp), which can increase
// the accuracy of query results.
//
// Note that some receivers might require this and in return fail to
// ingest such samples within the Request.
//
// For Go, see github.com/prometheus/prometheus/model/timestamp/timestamp.go
// for conversion from/to time.Time to Prometheus timestamp.
//
// Note that the "optional" keyword is omitted due to
// https://cloud.google.com/apis/design/design_patterns.md#optional_primitive_fields
// Zero value means value not set. If you need to use exactly zero value for
// the timestamp, use 1 millisecond before or after.
CreatedTimestamp int64 `protobuf:"varint,6,opt,name=created_timestamp,json=createdTimestamp,proto3" json:"created_timestamp,omitempty"`
}
func TimeseriesV2FromPool ¶ added in v1.20.0
func TimeseriesV2FromPool() *TimeSeriesV2
TimeseriesV2FromPool retrieves a pointer to a TimeSeriesV2 from a sync.Pool. ReuseTimeseriesV2 should be called once done, unless ReuseSliceV2 was called on the slice that contains this TimeSeriesV2 .
func (*TimeSeriesV2) Descriptor ¶ added in v1.20.0
func (*TimeSeriesV2) Descriptor() ([]byte, []int)
func (*TimeSeriesV2) Equal ¶ added in v1.20.0
func (this *TimeSeriesV2) Equal(that interface{}) bool
func (*TimeSeriesV2) GetCreatedTimestamp ¶ added in v1.20.0
func (m *TimeSeriesV2) GetCreatedTimestamp() int64
func (*TimeSeriesV2) GetExemplars ¶ added in v1.20.0
func (m *TimeSeriesV2) GetExemplars() []ExemplarV2
func (*TimeSeriesV2) GetHistograms ¶ added in v1.20.0
func (m *TimeSeriesV2) GetHistograms() []Histogram
func (*TimeSeriesV2) GetLabelsRefs ¶ added in v1.20.0
func (m *TimeSeriesV2) GetLabelsRefs() []uint32
func (*TimeSeriesV2) GetMetadata ¶ added in v1.20.0
func (m *TimeSeriesV2) GetMetadata() MetadataV2
func (*TimeSeriesV2) GetSamples ¶ added in v1.20.0
func (m *TimeSeriesV2) GetSamples() []Sample
func (*TimeSeriesV2) GoString ¶ added in v1.20.0
func (this *TimeSeriesV2) GoString() string
func (*TimeSeriesV2) Marshal ¶ added in v1.20.0
func (m *TimeSeriesV2) Marshal() (dAtA []byte, err error)
func (*TimeSeriesV2) MarshalTo ¶ added in v1.20.0
func (m *TimeSeriesV2) MarshalTo(dAtA []byte) (int, error)
func (*TimeSeriesV2) MarshalToSizedBuffer ¶ added in v1.20.0
func (m *TimeSeriesV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TimeSeriesV2) ProtoMessage ¶ added in v1.20.0
func (*TimeSeriesV2) ProtoMessage()
func (*TimeSeriesV2) Reset ¶ added in v1.20.0
func (m *TimeSeriesV2) Reset()
func (*TimeSeriesV2) Size ¶ added in v1.20.0
func (m *TimeSeriesV2) Size() (n int)
func (*TimeSeriesV2) String ¶ added in v1.20.0
func (this *TimeSeriesV2) String() string
func (*TimeSeriesV2) ToLabels ¶ added in v1.20.0
func (t *TimeSeriesV2) ToLabels(b *labels.ScratchBuilder, symbols []string) labels.Labels
func (*TimeSeriesV2) Unmarshal ¶ added in v1.20.0
func (m *TimeSeriesV2) Unmarshal(dAtA []byte) error
func (*TimeSeriesV2) XXX_DiscardUnknown ¶ added in v1.20.0
func (m *TimeSeriesV2) XXX_DiscardUnknown()
func (*TimeSeriesV2) XXX_Marshal ¶ added in v1.20.0
func (m *TimeSeriesV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeSeriesV2) XXX_Merge ¶ added in v1.20.0
func (m *TimeSeriesV2) XXX_Merge(src proto.Message)
func (*TimeSeriesV2) XXX_Size ¶ added in v1.20.0
func (m *TimeSeriesV2) XXX_Size() int
func (*TimeSeriesV2) XXX_Unmarshal ¶ added in v1.20.0
func (m *TimeSeriesV2) XXX_Unmarshal(b []byte) error
type WriteRequest ¶
type WriteRequest struct {
Timeseries []PreallocTimeseries `protobuf:"bytes,1,rep,name=timeseries,proto3,customtype=PreallocTimeseries" json:"timeseries"`
Source SourceEnum `protobuf:"varint,2,opt,name=Source,proto3,enum=cortexpb.SourceEnum" json:"Source,omitempty"`
Metadata []*MetricMetadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"`
SkipLabelNameValidation bool `` /* 138-byte string literal not displayed */
MessageWithBufRef `protobuf:"bytes,1001,opt,name=Ref,proto3,embedded=Ref,customtype=MessageWithBufRef" json:"Ref"`
}
func ToWriteRequest ¶
func ToWriteRequest(lbls []labels.Labels, samples []Sample, metadata []*MetricMetadata, histograms []Histogram, source SourceEnum) *WriteRequest
ToWriteRequest converts matched slices of Labels, Samples, Metadata and Histograms into a WriteRequest proto. It gets timeseries from the pool, so ReuseSlice() should be called when done.
func (*WriteRequest) AddHistogramTimeSeries ¶ added in v1.18.0
func (w *WriteRequest) AddHistogramTimeSeries(lbls []labels.Labels, histograms []Histogram)
func (*WriteRequest) Descriptor ¶
func (*WriteRequest) Descriptor() ([]byte, []int)
func (*WriteRequest) Equal ¶
func (this *WriteRequest) Equal(that interface{}) bool
func (*WriteRequest) GetMetadata ¶
func (m *WriteRequest) GetMetadata() []*MetricMetadata
func (*WriteRequest) GetSkipLabelNameValidation ¶
func (m *WriteRequest) GetSkipLabelNameValidation() bool
func (*WriteRequest) GetSource ¶
func (m *WriteRequest) GetSource() SourceEnum
func (*WriteRequest) GoString ¶
func (this *WriteRequest) GoString() string
func (*WriteRequest) Marshal ¶
func (m *WriteRequest) Marshal() (dAtA []byte, err error)
func (*WriteRequest) MarshalToSizedBuffer ¶
func (m *WriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) Reset ¶
func (m *WriteRequest) Reset()
func (*WriteRequest) Sign ¶ added in v1.16.0
func (w *WriteRequest) Sign(ctx context.Context) (string, error)
func (*WriteRequest) Size ¶
func (m *WriteRequest) Size() (n int)
func (*WriteRequest) String ¶
func (this *WriteRequest) String() string
func (*WriteRequest) Unmarshal ¶
func (m *WriteRequest) Unmarshal(dAtA []byte) error
func (*WriteRequest) VerifySign ¶ added in v1.16.0
func (*WriteRequest) XXX_DiscardUnknown ¶
func (m *WriteRequest) XXX_DiscardUnknown()
func (*WriteRequest) XXX_Marshal ¶
func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteRequest) XXX_Merge ¶
func (m *WriteRequest) XXX_Merge(src proto.Message)
func (*WriteRequest) XXX_Size ¶
func (m *WriteRequest) XXX_Size() int
func (*WriteRequest) XXX_Unmarshal ¶
func (m *WriteRequest) XXX_Unmarshal(b []byte) error
type WriteRequestV2 ¶ added in v1.20.0
type WriteRequestV2 struct {
Symbols []string `protobuf:"bytes,4,rep,name=symbols,proto3" json:"symbols,omitempty"`
Timeseries []PreallocTimeseriesV2 `protobuf:"bytes,5,rep,name=timeseries,proto3,customtype=PreallocTimeseriesV2" json:"timeseries"`
Source SourceEnum `protobuf:"varint,6,opt,name=Source,proto3,enum=cortexpb.SourceEnum" json:"Source,omitempty"`
SkipLabelNameValidation bool `` /* 138-byte string literal not displayed */
MessageWithBufRef `protobuf:"bytes,1001,opt,name=Ref,proto3,embedded=Ref,customtype=MessageWithBufRef" json:"Ref"`
}
refer to https://github.com/prometheus/prometheus/blob/v3.5.0/prompb/io/prometheus/write/v2/types.proto The histogram and Sample are shared with PRW1.
func (*WriteRequestV2) Descriptor ¶ added in v1.20.0
func (*WriteRequestV2) Descriptor() ([]byte, []int)
func (*WriteRequestV2) Equal ¶ added in v1.20.0
func (this *WriteRequestV2) Equal(that interface{}) bool
func (*WriteRequestV2) GetSkipLabelNameValidation ¶ added in v1.20.0
func (m *WriteRequestV2) GetSkipLabelNameValidation() bool
func (*WriteRequestV2) GetSource ¶ added in v1.20.0
func (m *WriteRequestV2) GetSource() SourceEnum
func (*WriteRequestV2) GetSymbols ¶ added in v1.20.0
func (m *WriteRequestV2) GetSymbols() []string
func (*WriteRequestV2) GoString ¶ added in v1.20.0
func (this *WriteRequestV2) GoString() string
func (*WriteRequestV2) Marshal ¶ added in v1.20.0
func (m *WriteRequestV2) Marshal() (dAtA []byte, err error)
func (*WriteRequestV2) MarshalTo ¶ added in v1.20.0
func (m *WriteRequestV2) MarshalTo(dAtA []byte) (int, error)
func (*WriteRequestV2) MarshalToSizedBuffer ¶ added in v1.20.0
func (m *WriteRequestV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WriteRequestV2) ProtoMessage ¶ added in v1.20.0
func (*WriteRequestV2) ProtoMessage()
func (*WriteRequestV2) Reset ¶ added in v1.20.0
func (m *WriteRequestV2) Reset()
func (*WriteRequestV2) Size ¶ added in v1.20.0
func (m *WriteRequestV2) Size() (n int)
func (*WriteRequestV2) String ¶ added in v1.20.0
func (this *WriteRequestV2) String() string
func (*WriteRequestV2) Unmarshal ¶ added in v1.20.0
func (m *WriteRequestV2) Unmarshal(dAtA []byte) error
func (*WriteRequestV2) XXX_DiscardUnknown ¶ added in v1.20.0
func (m *WriteRequestV2) XXX_DiscardUnknown()
func (*WriteRequestV2) XXX_Marshal ¶ added in v1.20.0
func (m *WriteRequestV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteRequestV2) XXX_Merge ¶ added in v1.20.0
func (m *WriteRequestV2) XXX_Merge(src proto.Message)
func (*WriteRequestV2) XXX_Size ¶ added in v1.20.0
func (m *WriteRequestV2) XXX_Size() int
func (*WriteRequestV2) XXX_Unmarshal ¶ added in v1.20.0
func (m *WriteRequestV2) XXX_Unmarshal(b []byte) error
type WriteResponse ¶
type WriteResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// Samples represents X-Prometheus-Remote-Write-Written-Samples
Samples int64 `protobuf:"varint,3,opt,name=Samples,proto3" json:"Samples,omitempty"`
// Histograms represents X-Prometheus-Remote-Write-Written-Histograms
Histograms int64 `protobuf:"varint,4,opt,name=Histograms,proto3" json:"Histograms,omitempty"`
// Exemplars represents X-Prometheus-Remote-Write-Written-Exemplars
Exemplars int64 `protobuf:"varint,5,opt,name=Exemplars,proto3" json:"Exemplars,omitempty"`
}
func (*WriteResponse) Descriptor ¶
func (*WriteResponse) Descriptor() ([]byte, []int)
func (*WriteResponse) Equal ¶
func (this *WriteResponse) Equal(that interface{}) bool
func (*WriteResponse) GetCode ¶ added in v1.20.0
func (m *WriteResponse) GetCode() int32
func (*WriteResponse) GetExemplars ¶ added in v1.20.0
func (m *WriteResponse) GetExemplars() int64
func (*WriteResponse) GetHistograms ¶ added in v1.20.0
func (m *WriteResponse) GetHistograms() int64
func (*WriteResponse) GetMessage ¶ added in v1.20.0
func (m *WriteResponse) GetMessage() string
func (*WriteResponse) GetSamples ¶ added in v1.20.0
func (m *WriteResponse) GetSamples() int64
func (*WriteResponse) GoString ¶
func (this *WriteResponse) GoString() string
func (*WriteResponse) Marshal ¶
func (m *WriteResponse) Marshal() (dAtA []byte, err error)
func (*WriteResponse) MarshalToSizedBuffer ¶
func (m *WriteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WriteResponse) ProtoMessage ¶
func (*WriteResponse) ProtoMessage()
func (*WriteResponse) Reset ¶
func (m *WriteResponse) Reset()
func (*WriteResponse) Size ¶
func (m *WriteResponse) Size() (n int)
func (*WriteResponse) String ¶
func (this *WriteResponse) String() string
func (*WriteResponse) Unmarshal ¶
func (m *WriteResponse) Unmarshal(dAtA []byte) error
func (*WriteResponse) XXX_DiscardUnknown ¶
func (m *WriteResponse) XXX_DiscardUnknown()
func (*WriteResponse) XXX_Marshal ¶
func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteResponse) XXX_Merge ¶
func (m *WriteResponse) XXX_Merge(src proto.Message)
func (*WriteResponse) XXX_Size ¶
func (m *WriteResponse) XXX_Size() int
func (*WriteResponse) XXX_Unmarshal ¶
func (m *WriteResponse) XXX_Unmarshal(b []byte) error