Documentation ¶
Index ¶
- Variables
- func CopyLabels(input []labels.Label) labels.Labels
- 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 MetricMetadataMetricTypeToMetricType(mt MetricMetadata_MetricType) textparse.MetricType
- func ReuseSlice(ts []PreallocTimeseries)
- func ReuseTimeseries(ts *TimeSeries)
- func ReuseWriteRequest(req *PreallocWriteRequest)
- func SampleJsoniterDecode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func SampleJsoniterEncode(ptr unsafe.Pointer, stream *jsoniter.Stream)
- 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 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 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 PreallocWriteRequest
- 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 TimeSeries
- func (*TimeSeries) Descriptor() ([]byte, []int)
- func (this *TimeSeries) Equal(that interface{}) bool
- func (m *TimeSeries) GetExemplars() []Exemplar
- 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 WriteRequest
- 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() WriteRequest_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 (m *WriteRequest) Size() (n int)
- func (this *WriteRequest) String() string
- func (m *WriteRequest) Unmarshal(dAtA []byte) 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 WriteRequest_SourceEnum
- type WriteResponse
- func (*WriteResponse) Descriptor() ([]byte, []int)
- func (this *WriteResponse) Equal(that interface{}) bool
- 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 ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthCortex = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCortex = fmt.Errorf("proto: integer overflow") )
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 WriteRequest_SourceEnum_name = map[int32]string{
0: "API",
1: "RULE",
}
var WriteRequest_SourceEnum_value = map[string]int32{
"API": 0,
"RULE": 1,
}
Functions ¶
func CopyLabels ¶
Efficiently copies labels input slice. To be used in cases where input slice can be reused, but long-term copy is needed.
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 MetricMetadataMetricTypeToMetricType ¶
func MetricMetadataMetricTypeToMetricType(mt MetricMetadata_MetricType) textparse.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 ReuseTimeseries ¶
func ReuseTimeseries(ts *TimeSeries)
ReuseTimeseries puts the timeseries back into a sync.Pool for reuse.
func ReuseWriteRequest ¶ added in v1.15.0
func ReuseWriteRequest(req *PreallocWriteRequest)
Types ¶
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 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 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 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 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 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"` }
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) 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 WriteRequest ¶
type WriteRequest struct { Timeseries []PreallocTimeseries `protobuf:"bytes,1,rep,name=timeseries,proto3,customtype=PreallocTimeseries" json:"timeseries"` Source WriteRequest_SourceEnum `protobuf:"varint,2,opt,name=Source,proto3,enum=cortexpb.WriteRequest_SourceEnum" json:"Source,omitempty"` Metadata []*MetricMetadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` SkipLabelNameValidation bool `` /* 138-byte string literal not displayed */ }
func ToWriteRequest ¶
func ToWriteRequest(lbls []labels.Labels, samples []Sample, metadata []*MetricMetadata, source WriteRequest_SourceEnum) *WriteRequest
ToWriteRequest converts matched slices of Labels, Samples and Metadata into a WriteRequest proto. It gets timeseries from the pool, so ReuseSlice() should be called when done.
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() WriteRequest_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) 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) 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 WriteRequest_SourceEnum ¶
type WriteRequest_SourceEnum int32
const ( API WriteRequest_SourceEnum = 0 RULE WriteRequest_SourceEnum = 1 )
func (WriteRequest_SourceEnum) EnumDescriptor ¶
func (WriteRequest_SourceEnum) EnumDescriptor() ([]byte, []int)
func (WriteRequest_SourceEnum) String ¶
func (x WriteRequest_SourceEnum) String() string
type WriteResponse ¶
type WriteResponse struct { }
func (*WriteResponse) Descriptor ¶
func (*WriteResponse) Descriptor() ([]byte, []int)
func (*WriteResponse) Equal ¶
func (this *WriteResponse) Equal(that interface{}) bool
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