mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-18 11:34:05 -08:00
df3b674f01
We cannot just use prometheus/client_model directly because we want to stay consistent with the use of gogo-protobuf. So this converts metrics.proto to proto3 and edits it lightly so that it fits into the framework how prometheus/prometheus handles protobuf. Note that metrics.proto couldn't be merged into the prompb package because prompb already has an Exemplar type, which is different from the Exemplar type in metrics.proto. The directory structure seems to play a role in the protobuf world, so I better kept it. Signed-off-by: beorn7 <beorn@grafana.com>
3811 lines
90 KiB
Go
3811 lines
90 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: io/prometheus/client/metrics.proto
|
|
|
|
package io_prometheus_client
|
|
|
|
import (
|
|
encoding_binary "encoding/binary"
|
|
fmt "fmt"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
types "github.com/gogo/protobuf/types"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type MetricType int32
|
|
|
|
const (
|
|
MetricType_COUNTER MetricType = 0
|
|
MetricType_GAUGE MetricType = 1
|
|
MetricType_SUMMARY MetricType = 2
|
|
MetricType_UNTYPED MetricType = 3
|
|
MetricType_HISTOGRAM MetricType = 4
|
|
)
|
|
|
|
var MetricType_name = map[int32]string{
|
|
0: "COUNTER",
|
|
1: "GAUGE",
|
|
2: "SUMMARY",
|
|
3: "UNTYPED",
|
|
4: "HISTOGRAM",
|
|
}
|
|
|
|
var MetricType_value = map[string]int32{
|
|
"COUNTER": 0,
|
|
"GAUGE": 1,
|
|
"SUMMARY": 2,
|
|
"UNTYPED": 3,
|
|
"HISTOGRAM": 4,
|
|
}
|
|
|
|
func (x MetricType) String() string {
|
|
return proto.EnumName(MetricType_name, int32(x))
|
|
}
|
|
|
|
func (MetricType) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{0}
|
|
}
|
|
|
|
type LabelPair struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *LabelPair) Reset() { *m = LabelPair{} }
|
|
func (m *LabelPair) String() string { return proto.CompactTextString(m) }
|
|
func (*LabelPair) ProtoMessage() {}
|
|
func (*LabelPair) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{0}
|
|
}
|
|
func (m *LabelPair) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_LabelPair.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *LabelPair) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_LabelPair.Merge(m, src)
|
|
}
|
|
func (m *LabelPair) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *LabelPair) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_LabelPair.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_LabelPair proto.InternalMessageInfo
|
|
|
|
func (m *LabelPair) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *LabelPair) GetValue() string {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Gauge struct {
|
|
Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Gauge) Reset() { *m = Gauge{} }
|
|
func (m *Gauge) String() string { return proto.CompactTextString(m) }
|
|
func (*Gauge) ProtoMessage() {}
|
|
func (*Gauge) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{1}
|
|
}
|
|
func (m *Gauge) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Gauge.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Gauge) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Gauge.Merge(m, src)
|
|
}
|
|
func (m *Gauge) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Gauge) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Gauge.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Gauge proto.InternalMessageInfo
|
|
|
|
func (m *Gauge) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Counter struct {
|
|
Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
|
|
Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Counter) Reset() { *m = Counter{} }
|
|
func (m *Counter) String() string { return proto.CompactTextString(m) }
|
|
func (*Counter) ProtoMessage() {}
|
|
func (*Counter) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{2}
|
|
}
|
|
func (m *Counter) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Counter.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Counter) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Counter.Merge(m, src)
|
|
}
|
|
func (m *Counter) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Counter) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Counter.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Counter proto.InternalMessageInfo
|
|
|
|
func (m *Counter) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Counter) GetExemplar() *Exemplar {
|
|
if m != nil {
|
|
return m.Exemplar
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Quantile struct {
|
|
Quantile float64 `protobuf:"fixed64,1,opt,name=quantile,proto3" json:"quantile,omitempty"`
|
|
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Quantile) Reset() { *m = Quantile{} }
|
|
func (m *Quantile) String() string { return proto.CompactTextString(m) }
|
|
func (*Quantile) ProtoMessage() {}
|
|
func (*Quantile) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{3}
|
|
}
|
|
func (m *Quantile) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Quantile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Quantile.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Quantile) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Quantile.Merge(m, src)
|
|
}
|
|
func (m *Quantile) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Quantile) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Quantile.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Quantile proto.InternalMessageInfo
|
|
|
|
func (m *Quantile) GetQuantile() float64 {
|
|
if m != nil {
|
|
return m.Quantile
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Quantile) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Summary struct {
|
|
SampleCount uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount,proto3" json:"sample_count,omitempty"`
|
|
SampleSum float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum,proto3" json:"sample_sum,omitempty"`
|
|
Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile,proto3" json:"quantile,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Summary) Reset() { *m = Summary{} }
|
|
func (m *Summary) String() string { return proto.CompactTextString(m) }
|
|
func (*Summary) ProtoMessage() {}
|
|
func (*Summary) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{4}
|
|
}
|
|
func (m *Summary) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Summary.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Summary) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Summary.Merge(m, src)
|
|
}
|
|
func (m *Summary) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Summary) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Summary.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Summary proto.InternalMessageInfo
|
|
|
|
func (m *Summary) GetSampleCount() uint64 {
|
|
if m != nil {
|
|
return m.SampleCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Summary) GetSampleSum() float64 {
|
|
if m != nil {
|
|
return m.SampleSum
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Summary) GetQuantile() []*Quantile {
|
|
if m != nil {
|
|
return m.Quantile
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Untyped struct {
|
|
Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Untyped) Reset() { *m = Untyped{} }
|
|
func (m *Untyped) String() string { return proto.CompactTextString(m) }
|
|
func (*Untyped) ProtoMessage() {}
|
|
func (*Untyped) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{5}
|
|
}
|
|
func (m *Untyped) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Untyped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Untyped.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Untyped) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Untyped.Merge(m, src)
|
|
}
|
|
func (m *Untyped) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Untyped) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Untyped.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Untyped proto.InternalMessageInfo
|
|
|
|
func (m *Untyped) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Histogram struct {
|
|
SampleCount uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount,proto3" json:"sample_count,omitempty"`
|
|
SampleSum float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum,proto3" json:"sample_sum,omitempty"`
|
|
Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket,proto3" json:"bucket,omitempty"`
|
|
// Sparse bucket (sb) stuff:
|
|
// The sb_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.
|
|
SbSchema int32 `protobuf:"zigzag32,4,opt,name=sb_schema,json=sbSchema,proto3" json:"sb_schema,omitempty"`
|
|
SbZeroThreshold float64 `protobuf:"fixed64,5,opt,name=sb_zero_threshold,json=sbZeroThreshold,proto3" json:"sb_zero_threshold,omitempty"`
|
|
SbZeroCount uint64 `protobuf:"varint,6,opt,name=sb_zero_count,json=sbZeroCount,proto3" json:"sb_zero_count,omitempty"`
|
|
SbNegative *SparseBuckets `protobuf:"bytes,7,opt,name=sb_negative,json=sbNegative,proto3" json:"sb_negative,omitempty"`
|
|
SbPositive *SparseBuckets `protobuf:"bytes,8,opt,name=sb_positive,json=sbPositive,proto3" json:"sb_positive,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Histogram) Reset() { *m = Histogram{} }
|
|
func (m *Histogram) String() string { return proto.CompactTextString(m) }
|
|
func (*Histogram) ProtoMessage() {}
|
|
func (*Histogram) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{6}
|
|
}
|
|
func (m *Histogram) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Histogram.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Histogram) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Histogram.Merge(m, src)
|
|
}
|
|
func (m *Histogram) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Histogram) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Histogram.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Histogram proto.InternalMessageInfo
|
|
|
|
func (m *Histogram) GetSampleCount() uint64 {
|
|
if m != nil {
|
|
return m.SampleCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Histogram) GetSampleSum() float64 {
|
|
if m != nil {
|
|
return m.SampleSum
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Histogram) GetBucket() []*Bucket {
|
|
if m != nil {
|
|
return m.Bucket
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Histogram) GetSbSchema() int32 {
|
|
if m != nil {
|
|
return m.SbSchema
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Histogram) GetSbZeroThreshold() float64 {
|
|
if m != nil {
|
|
return m.SbZeroThreshold
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Histogram) GetSbZeroCount() uint64 {
|
|
if m != nil {
|
|
return m.SbZeroCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Histogram) GetSbNegative() *SparseBuckets {
|
|
if m != nil {
|
|
return m.SbNegative
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Histogram) GetSbPositive() *SparseBuckets {
|
|
if m != nil {
|
|
return m.SbPositive
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Bucket struct {
|
|
CumulativeCount uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount,proto3" json:"cumulative_count,omitempty"`
|
|
UpperBound float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound,proto3" json:"upper_bound,omitempty"`
|
|
Exemplar *Exemplar `protobuf:"bytes,3,opt,name=exemplar,proto3" json:"exemplar,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Bucket) Reset() { *m = Bucket{} }
|
|
func (m *Bucket) String() string { return proto.CompactTextString(m) }
|
|
func (*Bucket) ProtoMessage() {}
|
|
func (*Bucket) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{7}
|
|
}
|
|
func (m *Bucket) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Bucket.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Bucket) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Bucket.Merge(m, src)
|
|
}
|
|
func (m *Bucket) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Bucket) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Bucket.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Bucket proto.InternalMessageInfo
|
|
|
|
func (m *Bucket) GetCumulativeCount() uint64 {
|
|
if m != nil {
|
|
return m.CumulativeCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Bucket) GetUpperBound() float64 {
|
|
if m != nil {
|
|
return m.UpperBound
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Bucket) GetExemplar() *Exemplar {
|
|
if m != nil {
|
|
return m.Exemplar
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type SparseBuckets struct {
|
|
Span []*SparseBuckets_Span `protobuf:"bytes,1,rep,name=span,proto3" json:"span,omitempty"`
|
|
Delta []int64 `protobuf:"zigzag64,2,rep,packed,name=delta,proto3" json:"delta,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SparseBuckets) Reset() { *m = SparseBuckets{} }
|
|
func (m *SparseBuckets) String() string { return proto.CompactTextString(m) }
|
|
func (*SparseBuckets) ProtoMessage() {}
|
|
func (*SparseBuckets) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{8}
|
|
}
|
|
func (m *SparseBuckets) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SparseBuckets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SparseBuckets.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SparseBuckets) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SparseBuckets.Merge(m, src)
|
|
}
|
|
func (m *SparseBuckets) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SparseBuckets) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SparseBuckets.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SparseBuckets proto.InternalMessageInfo
|
|
|
|
func (m *SparseBuckets) GetSpan() []*SparseBuckets_Span {
|
|
if m != nil {
|
|
return m.Span
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SparseBuckets) GetDelta() []int64 {
|
|
if m != nil {
|
|
return m.Delta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type SparseBuckets_Span 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"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SparseBuckets_Span) Reset() { *m = SparseBuckets_Span{} }
|
|
func (m *SparseBuckets_Span) String() string { return proto.CompactTextString(m) }
|
|
func (*SparseBuckets_Span) ProtoMessage() {}
|
|
func (*SparseBuckets_Span) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{8, 0}
|
|
}
|
|
func (m *SparseBuckets_Span) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SparseBuckets_Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SparseBuckets_Span.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SparseBuckets_Span) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SparseBuckets_Span.Merge(m, src)
|
|
}
|
|
func (m *SparseBuckets_Span) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SparseBuckets_Span) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SparseBuckets_Span.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SparseBuckets_Span proto.InternalMessageInfo
|
|
|
|
func (m *SparseBuckets_Span) GetOffset() int32 {
|
|
if m != nil {
|
|
return m.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SparseBuckets_Span) GetLength() uint32 {
|
|
if m != nil {
|
|
return m.Length
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Exemplar struct {
|
|
Label []*LabelPair `protobuf:"bytes,1,rep,name=label,proto3" json:"label,omitempty"`
|
|
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
|
|
Timestamp *types.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Exemplar) Reset() { *m = Exemplar{} }
|
|
func (m *Exemplar) String() string { return proto.CompactTextString(m) }
|
|
func (*Exemplar) ProtoMessage() {}
|
|
func (*Exemplar) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{9}
|
|
}
|
|
func (m *Exemplar) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Exemplar.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Exemplar) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Exemplar.Merge(m, src)
|
|
}
|
|
func (m *Exemplar) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Exemplar) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Exemplar.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Exemplar proto.InternalMessageInfo
|
|
|
|
func (m *Exemplar) GetLabel() []*LabelPair {
|
|
if m != nil {
|
|
return m.Label
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Exemplar) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Exemplar) GetTimestamp() *types.Timestamp {
|
|
if m != nil {
|
|
return m.Timestamp
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Metric struct {
|
|
Label []*LabelPair `protobuf:"bytes,1,rep,name=label,proto3" json:"label,omitempty"`
|
|
Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge,proto3" json:"gauge,omitempty"`
|
|
Counter *Counter `protobuf:"bytes,3,opt,name=counter,proto3" json:"counter,omitempty"`
|
|
Summary *Summary `protobuf:"bytes,4,opt,name=summary,proto3" json:"summary,omitempty"`
|
|
Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped,proto3" json:"untyped,omitempty"`
|
|
Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram,proto3" json:"histogram,omitempty"`
|
|
TimestampMs int64 `protobuf:"varint,6,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Metric) Reset() { *m = Metric{} }
|
|
func (m *Metric) String() string { return proto.CompactTextString(m) }
|
|
func (*Metric) ProtoMessage() {}
|
|
func (*Metric) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{10}
|
|
}
|
|
func (m *Metric) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Metric) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Metric.Merge(m, src)
|
|
}
|
|
func (m *Metric) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Metric) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Metric.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Metric proto.InternalMessageInfo
|
|
|
|
func (m *Metric) GetLabel() []*LabelPair {
|
|
if m != nil {
|
|
return m.Label
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Metric) GetGauge() *Gauge {
|
|
if m != nil {
|
|
return m.Gauge
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Metric) GetCounter() *Counter {
|
|
if m != nil {
|
|
return m.Counter
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Metric) GetSummary() *Summary {
|
|
if m != nil {
|
|
return m.Summary
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Metric) GetUntyped() *Untyped {
|
|
if m != nil {
|
|
return m.Untyped
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Metric) GetHistogram() *Histogram {
|
|
if m != nil {
|
|
return m.Histogram
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Metric) GetTimestampMs() int64 {
|
|
if m != nil {
|
|
return m.TimestampMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type MetricFamily struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Help string `protobuf:"bytes,2,opt,name=help,proto3" json:"help,omitempty"`
|
|
Type MetricType `protobuf:"varint,3,opt,name=type,proto3,enum=io.prometheus.client.MetricType" json:"type,omitempty"`
|
|
Metric []*Metric `protobuf:"bytes,4,rep,name=metric,proto3" json:"metric,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *MetricFamily) Reset() { *m = MetricFamily{} }
|
|
func (m *MetricFamily) String() string { return proto.CompactTextString(m) }
|
|
func (*MetricFamily) ProtoMessage() {}
|
|
func (*MetricFamily) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_d1e5ddb18987a258, []int{11}
|
|
}
|
|
func (m *MetricFamily) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MetricFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MetricFamily.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MetricFamily) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MetricFamily.Merge(m, src)
|
|
}
|
|
func (m *MetricFamily) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MetricFamily) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MetricFamily.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MetricFamily proto.InternalMessageInfo
|
|
|
|
func (m *MetricFamily) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *MetricFamily) GetHelp() string {
|
|
if m != nil {
|
|
return m.Help
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *MetricFamily) GetType() MetricType {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return MetricType_COUNTER
|
|
}
|
|
|
|
func (m *MetricFamily) GetMetric() []*Metric {
|
|
if m != nil {
|
|
return m.Metric
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value)
|
|
proto.RegisterType((*LabelPair)(nil), "io.prometheus.client.LabelPair")
|
|
proto.RegisterType((*Gauge)(nil), "io.prometheus.client.Gauge")
|
|
proto.RegisterType((*Counter)(nil), "io.prometheus.client.Counter")
|
|
proto.RegisterType((*Quantile)(nil), "io.prometheus.client.Quantile")
|
|
proto.RegisterType((*Summary)(nil), "io.prometheus.client.Summary")
|
|
proto.RegisterType((*Untyped)(nil), "io.prometheus.client.Untyped")
|
|
proto.RegisterType((*Histogram)(nil), "io.prometheus.client.Histogram")
|
|
proto.RegisterType((*Bucket)(nil), "io.prometheus.client.Bucket")
|
|
proto.RegisterType((*SparseBuckets)(nil), "io.prometheus.client.SparseBuckets")
|
|
proto.RegisterType((*SparseBuckets_Span)(nil), "io.prometheus.client.SparseBuckets.Span")
|
|
proto.RegisterType((*Exemplar)(nil), "io.prometheus.client.Exemplar")
|
|
proto.RegisterType((*Metric)(nil), "io.prometheus.client.Metric")
|
|
proto.RegisterType((*MetricFamily)(nil), "io.prometheus.client.MetricFamily")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("io/prometheus/client/metrics.proto", fileDescriptor_d1e5ddb18987a258)
|
|
}
|
|
|
|
var fileDescriptor_d1e5ddb18987a258 = []byte{
|
|
// 848 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x8f, 0xdb, 0x44,
|
|
0x14, 0xc7, 0x89, 0xf3, 0xc7, 0x2f, 0x5d, 0x9a, 0x1d, 0xad, 0x90, 0xb5, 0x65, 0x77, 0x83, 0xb9,
|
|
0x2c, 0x3d, 0x38, 0xa2, 0xb4, 0x80, 0x50, 0x39, 0xec, 0xb6, 0x21, 0x45, 0x22, 0xdb, 0x65, 0x92,
|
|
0x1c, 0x5a, 0x0e, 0xd6, 0x38, 0x99, 0x4d, 0x2c, 0x3c, 0x1e, 0xe3, 0xb1, 0x2b, 0xc2, 0x17, 0xe0,
|
|
0x0a, 0x67, 0x6e, 0x7c, 0x1a, 0x8e, 0x7c, 0x04, 0xb4, 0x9f, 0x03, 0x09, 0x34, 0x7f, 0xec, 0x10,
|
|
0xc9, 0x41, 0x14, 0xf5, 0xe6, 0xf7, 0xfc, 0xfb, 0xbd, 0xf9, 0xbd, 0x37, 0x33, 0xbf, 0x01, 0x2f,
|
|
0xe2, 0xc3, 0x34, 0xe3, 0x8c, 0xe6, 0x6b, 0x5a, 0x88, 0xe1, 0x22, 0x8e, 0x68, 0x92, 0x0f, 0x19,
|
|
0xcd, 0xb3, 0x68, 0x21, 0xfc, 0x34, 0xe3, 0x39, 0x47, 0x47, 0x11, 0xf7, 0xb7, 0x18, 0x5f, 0x63,
|
|
0x8e, 0xcf, 0x56, 0x9c, 0xaf, 0x62, 0x3a, 0x54, 0x98, 0xb0, 0xb8, 0x19, 0xe6, 0x11, 0xa3, 0x22,
|
|
0x27, 0x2c, 0xd5, 0x34, 0xef, 0x11, 0x38, 0x5f, 0x91, 0x90, 0xc6, 0xd7, 0x24, 0xca, 0x10, 0x02,
|
|
0x3b, 0x21, 0x8c, 0xba, 0xd6, 0xc0, 0x3a, 0x77, 0xb0, 0xfa, 0x46, 0x47, 0xd0, 0x7a, 0x45, 0xe2,
|
|
0x82, 0xba, 0x0d, 0x95, 0xd4, 0x81, 0x77, 0x02, 0xad, 0x31, 0x29, 0x56, 0xff, 0xf8, 0x2d, 0x39,
|
|
0x56, 0xf9, 0xfb, 0x1b, 0xe8, 0x3c, 0xe1, 0x45, 0x92, 0xd3, 0xac, 0x1e, 0x80, 0x3e, 0x83, 0x2e,
|
|
0xfd, 0x9e, 0xb2, 0x34, 0x26, 0x99, 0x2a, 0xdc, 0x7b, 0x70, 0xea, 0xd7, 0x35, 0xe0, 0x8f, 0x0c,
|
|
0x0a, 0x57, 0x78, 0xef, 0x31, 0x74, 0xbf, 0x2e, 0x48, 0x92, 0x47, 0x31, 0x45, 0xc7, 0xd0, 0xfd,
|
|
0xce, 0x7c, 0x9b, 0x05, 0xaa, 0x78, 0x57, 0x79, 0x25, 0xed, 0x47, 0x0b, 0x3a, 0xd3, 0x82, 0x31,
|
|
0x92, 0x6d, 0xd0, 0x7b, 0x70, 0x47, 0x10, 0x96, 0xc6, 0x34, 0x58, 0x48, 0xb5, 0xaa, 0x82, 0x8d,
|
|
0x7b, 0x3a, 0xa7, 0x1a, 0x40, 0x27, 0x00, 0x06, 0x22, 0x0a, 0x66, 0x2a, 0x39, 0x3a, 0x33, 0x2d,
|
|
0x98, 0xec, 0xa3, 0x5a, 0xbf, 0x39, 0x68, 0xee, 0xef, 0xa3, 0x54, 0xbc, 0xd5, 0xe7, 0x9d, 0x41,
|
|
0x67, 0x9e, 0xe4, 0x9b, 0x94, 0x2e, 0xf7, 0x4c, 0xf1, 0xcf, 0x06, 0x38, 0xcf, 0x22, 0x91, 0xf3,
|
|
0x55, 0x46, 0xd8, 0x1b, 0x10, 0xfb, 0x10, 0xda, 0x61, 0xb1, 0xf8, 0x96, 0xe6, 0x46, 0xea, 0xbb,
|
|
0xf5, 0x52, 0x2f, 0x15, 0x06, 0x1b, 0x2c, 0xba, 0x07, 0x8e, 0x08, 0x03, 0xb1, 0x58, 0x53, 0x46,
|
|
0x5c, 0x7b, 0x60, 0x9d, 0x1f, 0xe2, 0xae, 0x08, 0xa7, 0x2a, 0x46, 0xf7, 0xe1, 0x50, 0x84, 0xc1,
|
|
0x0f, 0x34, 0xe3, 0x41, 0xbe, 0xce, 0xa8, 0x58, 0xf3, 0x78, 0xe9, 0xb6, 0xd4, 0xc2, 0x77, 0x45,
|
|
0xf8, 0x92, 0x66, 0x7c, 0x56, 0xa6, 0x91, 0x07, 0x07, 0x25, 0x56, 0x77, 0xd0, 0x36, 0x1d, 0x28,
|
|
0x9c, 0xee, 0xe0, 0x29, 0xf4, 0x44, 0x18, 0x24, 0x74, 0x45, 0xf2, 0xe8, 0x15, 0x75, 0x3b, 0xea,
|
|
0x68, 0xbc, 0x5f, 0xaf, 0x73, 0x9a, 0x92, 0x4c, 0x50, 0xad, 0x56, 0x60, 0x10, 0xe1, 0x95, 0xa1,
|
|
0x99, 0x2a, 0x29, 0x17, 0x91, 0xaa, 0xd2, 0x7d, 0xad, 0x2a, 0xd7, 0x86, 0xe6, 0xfd, 0x64, 0x41,
|
|
0x5b, 0xe7, 0xd1, 0x07, 0xd0, 0x5f, 0x14, 0xac, 0x88, 0x55, 0xf9, 0x9d, 0xf9, 0xdf, 0xdd, 0xe6,
|
|
0x75, 0x07, 0x67, 0xd0, 0x2b, 0xd2, 0x94, 0x66, 0x41, 0xc8, 0x8b, 0x64, 0x69, 0x36, 0x01, 0x54,
|
|
0xea, 0x52, 0x66, 0x76, 0x8e, 0x7e, 0xf3, 0x35, 0x8f, 0xfe, 0x2f, 0x16, 0x1c, 0xec, 0x08, 0x46,
|
|
0x8f, 0xc1, 0x16, 0x29, 0x49, 0x5c, 0x4b, 0xed, 0xe8, 0xf9, 0x7f, 0xe8, 0x51, 0x46, 0x09, 0x56,
|
|
0x2c, 0x79, 0xee, 0x96, 0x34, 0xce, 0x89, 0xdb, 0x18, 0x34, 0xcf, 0x11, 0xd6, 0xc1, 0xf1, 0xc7,
|
|
0x60, 0x4b, 0x0c, 0x7a, 0x07, 0xda, 0xfc, 0xe6, 0x46, 0x50, 0xdd, 0xeb, 0x21, 0x36, 0x91, 0xcc,
|
|
0xc7, 0x34, 0x59, 0xe5, 0x6b, 0xd5, 0xdd, 0x01, 0x36, 0x91, 0xf7, 0xb3, 0x05, 0xdd, 0x52, 0x34,
|
|
0x7a, 0x04, 0xad, 0x58, 0x1a, 0x8b, 0x51, 0x76, 0x56, 0xaf, 0xac, 0xf2, 0x1e, 0xac, 0xd1, 0xf5,
|
|
0x97, 0x16, 0x7d, 0x0a, 0x4e, 0x65, 0x5c, 0x66, 0x68, 0xc7, 0xbe, 0xb6, 0x36, 0xbf, 0xb4, 0x36,
|
|
0x7f, 0x56, 0x22, 0xf0, 0x16, 0xec, 0xfd, 0xd5, 0x80, 0xf6, 0x44, 0x19, 0xe5, 0xff, 0x55, 0xf4,
|
|
0x21, 0xb4, 0x56, 0xd2, 0xea, 0x8c, 0x4f, 0xdd, 0xab, 0xa7, 0x29, 0x37, 0xc4, 0x1a, 0x89, 0x3e,
|
|
0x81, 0xce, 0x42, 0xdb, 0x9f, 0x11, 0x7b, 0x52, 0x4f, 0x32, 0x1e, 0x89, 0x4b, 0xb4, 0x24, 0x0a,
|
|
0xed, 0x4d, 0xea, 0xa6, 0xed, 0x25, 0x1a, 0x03, 0xc3, 0x25, 0x5a, 0x12, 0x0b, 0xed, 0x25, 0xea,
|
|
0xf6, 0xed, 0x25, 0x1a, 0xc3, 0xc1, 0x25, 0x1a, 0x7d, 0x0e, 0xce, 0xba, 0xb4, 0x18, 0x73, 0xdd,
|
|
0xf6, 0x0c, 0xa6, 0x72, 0x22, 0xbc, 0x65, 0x48, 0x53, 0xaa, 0x66, 0x1d, 0x30, 0xa1, 0xae, 0x74,
|
|
0x13, 0xf7, 0xaa, 0xdc, 0x44, 0x78, 0xbf, 0x5a, 0x70, 0x47, 0xef, 0xc0, 0x17, 0x84, 0x45, 0xf1,
|
|
0xa6, 0xf6, 0x95, 0x41, 0x60, 0xaf, 0x69, 0x9c, 0x9a, 0x47, 0x46, 0x7d, 0xa3, 0x87, 0x60, 0x4b,
|
|
0x8d, 0x6a, 0x84, 0x6f, 0x3f, 0x18, 0xd4, 0xab, 0xd2, 0x95, 0x67, 0x9b, 0x94, 0x62, 0x85, 0x96,
|
|
0x26, 0xa7, 0x1f, 0x46, 0xd7, 0xfe, 0x37, 0x93, 0xd3, 0x3c, 0x6c, 0xb0, 0xf7, 0x27, 0x00, 0xdb,
|
|
0x4a, 0xa8, 0x07, 0x9d, 0x27, 0xcf, 0xe7, 0x57, 0xb3, 0x11, 0xee, 0xbf, 0x85, 0x1c, 0x68, 0x8d,
|
|
0x2f, 0xe6, 0xe3, 0x51, 0xdf, 0x92, 0xf9, 0xe9, 0x7c, 0x32, 0xb9, 0xc0, 0x2f, 0xfa, 0x0d, 0x19,
|
|
0xcc, 0xaf, 0x66, 0x2f, 0xae, 0x47, 0x4f, 0xfb, 0x4d, 0x74, 0x00, 0xce, 0xb3, 0x2f, 0xa7, 0xb3,
|
|
0xe7, 0x63, 0x7c, 0x31, 0xe9, 0xdb, 0x97, 0xde, 0x6f, 0xb7, 0xa7, 0xd6, 0xef, 0xb7, 0xa7, 0xd6,
|
|
0x1f, 0xb7, 0xa7, 0xd6, 0xcb, 0xa3, 0x88, 0x07, 0x5b, 0x05, 0x81, 0x56, 0x10, 0xb6, 0xd5, 0xc1,
|
|
0xfd, 0xe8, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x94, 0x4a, 0x80, 0xdd, 0x07, 0x00, 0x00,
|
|
}
|
|
|
|
func (m *LabelPair) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *LabelPair) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *LabelPair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintMetrics(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Gauge) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Gauge) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Value != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Counter) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Counter) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Exemplar != nil {
|
|
{
|
|
size, err := m.Exemplar.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Value != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Quantile) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Quantile) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Quantile) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Value != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.Quantile != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Quantile))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Summary) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Summary) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Summary) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Quantile) > 0 {
|
|
for iNdEx := len(m.Quantile) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Quantile[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if m.SampleSum != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SampleSum))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.SampleCount != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.SampleCount))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Untyped) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Untyped) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Untyped) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Value != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Histogram) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Histogram) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.SbPositive != nil {
|
|
{
|
|
size, err := m.SbPositive.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x42
|
|
}
|
|
if m.SbNegative != nil {
|
|
{
|
|
size, err := m.SbNegative.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
if m.SbZeroCount != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.SbZeroCount))
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if m.SbZeroThreshold != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SbZeroThreshold))))
|
|
i--
|
|
dAtA[i] = 0x29
|
|
}
|
|
if m.SbSchema != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64((uint32(m.SbSchema)<<1)^uint32((m.SbSchema>>31))))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.Bucket) > 0 {
|
|
for iNdEx := len(m.Bucket) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Bucket[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if m.SampleSum != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SampleSum))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.SampleCount != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.SampleCount))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Bucket) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Bucket) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Bucket) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Exemplar != nil {
|
|
{
|
|
size, err := m.Exemplar.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.UpperBound != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.UpperBound))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.CumulativeCount != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.CumulativeCount))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SparseBuckets) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SparseBuckets) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SparseBuckets) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Delta) > 0 {
|
|
var j5 int
|
|
dAtA7 := make([]byte, len(m.Delta)*10)
|
|
for _, num := range m.Delta {
|
|
x6 := (uint64(num) << 1) ^ uint64((num >> 63))
|
|
for x6 >= 1<<7 {
|
|
dAtA7[j5] = uint8(uint64(x6)&0x7f | 0x80)
|
|
j5++
|
|
x6 >>= 7
|
|
}
|
|
dAtA7[j5] = uint8(x6)
|
|
j5++
|
|
}
|
|
i -= j5
|
|
copy(dAtA[i:], dAtA7[:j5])
|
|
i = encodeVarintMetrics(dAtA, i, uint64(j5))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Span) > 0 {
|
|
for iNdEx := len(m.Span) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Span[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SparseBuckets_Span) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SparseBuckets_Span) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SparseBuckets_Span) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Length != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.Length))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Offset != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64((uint32(m.Offset)<<1)^uint32((m.Offset>>31))))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Exemplar) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Exemplar) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Timestamp != nil {
|
|
{
|
|
size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Value != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if len(m.Label) > 0 {
|
|
for iNdEx := len(m.Label) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Label[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Metric) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Metric) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Histogram != nil {
|
|
{
|
|
size, err := m.Histogram.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
if m.TimestampMs != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.TimestampMs))
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if m.Untyped != nil {
|
|
{
|
|
size, err := m.Untyped.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if m.Summary != nil {
|
|
{
|
|
size, err := m.Summary.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Counter != nil {
|
|
{
|
|
size, err := m.Counter.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Gauge != nil {
|
|
{
|
|
size, err := m.Gauge.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Label) > 0 {
|
|
for iNdEx := len(m.Label) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Label[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MetricFamily) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MetricFamily) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MetricFamily) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Metric) > 0 {
|
|
for iNdEx := len(m.Metric) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Metric[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMetrics(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if m.Type != 0 {
|
|
i = encodeVarintMetrics(dAtA, i, uint64(m.Type))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.Help) > 0 {
|
|
i -= len(m.Help)
|
|
copy(dAtA[i:], m.Help)
|
|
i = encodeVarintMetrics(dAtA, i, uint64(len(m.Help)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovMetrics(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *LabelPair) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Gauge) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Counter) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
if m.Exemplar != nil {
|
|
l = m.Exemplar.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Quantile) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Quantile != 0 {
|
|
n += 9
|
|
}
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Summary) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.SampleCount != 0 {
|
|
n += 1 + sovMetrics(uint64(m.SampleCount))
|
|
}
|
|
if m.SampleSum != 0 {
|
|
n += 9
|
|
}
|
|
if len(m.Quantile) > 0 {
|
|
for _, e := range m.Quantile {
|
|
l = e.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Untyped) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Histogram) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.SampleCount != 0 {
|
|
n += 1 + sovMetrics(uint64(m.SampleCount))
|
|
}
|
|
if m.SampleSum != 0 {
|
|
n += 9
|
|
}
|
|
if len(m.Bucket) > 0 {
|
|
for _, e := range m.Bucket {
|
|
l = e.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
}
|
|
if m.SbSchema != 0 {
|
|
n += 1 + sozMetrics(uint64(m.SbSchema))
|
|
}
|
|
if m.SbZeroThreshold != 0 {
|
|
n += 9
|
|
}
|
|
if m.SbZeroCount != 0 {
|
|
n += 1 + sovMetrics(uint64(m.SbZeroCount))
|
|
}
|
|
if m.SbNegative != nil {
|
|
l = m.SbNegative.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.SbPositive != nil {
|
|
l = m.SbPositive.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Bucket) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.CumulativeCount != 0 {
|
|
n += 1 + sovMetrics(uint64(m.CumulativeCount))
|
|
}
|
|
if m.UpperBound != 0 {
|
|
n += 9
|
|
}
|
|
if m.Exemplar != nil {
|
|
l = m.Exemplar.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SparseBuckets) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Span) > 0 {
|
|
for _, e := range m.Span {
|
|
l = e.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Delta) > 0 {
|
|
l = 0
|
|
for _, e := range m.Delta {
|
|
l += sozMetrics(uint64(e))
|
|
}
|
|
n += 1 + sovMetrics(uint64(l)) + l
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SparseBuckets_Span) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Offset != 0 {
|
|
n += 1 + sozMetrics(uint64(m.Offset))
|
|
}
|
|
if m.Length != 0 {
|
|
n += 1 + sovMetrics(uint64(m.Length))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Exemplar) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Label) > 0 {
|
|
for _, e := range m.Label {
|
|
l = e.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
}
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
if m.Timestamp != nil {
|
|
l = m.Timestamp.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Metric) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Label) > 0 {
|
|
for _, e := range m.Label {
|
|
l = e.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
}
|
|
if m.Gauge != nil {
|
|
l = m.Gauge.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.Counter != nil {
|
|
l = m.Counter.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.Summary != nil {
|
|
l = m.Summary.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.Untyped != nil {
|
|
l = m.Untyped.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.TimestampMs != 0 {
|
|
n += 1 + sovMetrics(uint64(m.TimestampMs))
|
|
}
|
|
if m.Histogram != nil {
|
|
l = m.Histogram.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MetricFamily) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
l = len(m.Help)
|
|
if l > 0 {
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
if m.Type != 0 {
|
|
n += 1 + sovMetrics(uint64(m.Type))
|
|
}
|
|
if len(m.Metric) > 0 {
|
|
for _, e := range m.Metric {
|
|
l = e.Size()
|
|
n += 1 + l + sovMetrics(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovMetrics(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozMetrics(x uint64) (n int) {
|
|
return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *LabelPair) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: LabelPair: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: LabelPair: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Gauge) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Gauge: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Gauge: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Counter) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Counter: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Exemplar", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Exemplar == nil {
|
|
m.Exemplar = &Exemplar{}
|
|
}
|
|
if err := m.Exemplar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Quantile) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Quantile: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Quantile: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Quantile", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Quantile = float64(math.Float64frombits(v))
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Summary) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Summary: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Summary: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SampleCount", wireType)
|
|
}
|
|
m.SampleCount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.SampleCount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SampleSum", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.SampleSum = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Quantile", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Quantile = append(m.Quantile, &Quantile{})
|
|
if err := m.Quantile[len(m.Quantile)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Untyped) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Untyped: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Untyped: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Histogram) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Histogram: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SampleCount", wireType)
|
|
}
|
|
m.SampleCount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.SampleCount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SampleSum", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.SampleSum = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Bucket = append(m.Bucket, &Bucket{})
|
|
if err := m.Bucket[len(m.Bucket)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SbSchema", wireType)
|
|
}
|
|
var v int32
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))
|
|
m.SbSchema = v
|
|
case 5:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SbZeroThreshold", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.SbZeroThreshold = float64(math.Float64frombits(v))
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SbZeroCount", wireType)
|
|
}
|
|
m.SbZeroCount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.SbZeroCount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SbNegative", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.SbNegative == nil {
|
|
m.SbNegative = &SparseBuckets{}
|
|
}
|
|
if err := m.SbNegative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 8:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SbPositive", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.SbPositive == nil {
|
|
m.SbPositive = &SparseBuckets{}
|
|
}
|
|
if err := m.SbPositive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Bucket) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Bucket: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Bucket: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CumulativeCount", wireType)
|
|
}
|
|
m.CumulativeCount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.CumulativeCount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpperBound", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.UpperBound = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Exemplar", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Exemplar == nil {
|
|
m.Exemplar = &Exemplar{}
|
|
}
|
|
if err := m.Exemplar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SparseBuckets) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SparseBuckets: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SparseBuckets: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Span", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Span = append(m.Span, &SparseBuckets_Span{})
|
|
if err := m.Span[len(m.Span)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType == 0 {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)
|
|
m.Delta = append(m.Delta, int64(v))
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.Delta) == 0 {
|
|
m.Delta = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)
|
|
m.Delta = append(m.Delta, int64(v))
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Delta", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SparseBuckets_Span) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Span: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
|
}
|
|
var v int32
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))
|
|
m.Offset = v
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType)
|
|
}
|
|
m.Length = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Length |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Exemplar) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Exemplar: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Exemplar: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Label = append(m.Label, &LabelPair{})
|
|
if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Timestamp == nil {
|
|
m.Timestamp = &types.Timestamp{}
|
|
}
|
|
if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Metric) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Metric: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Metric: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Label = append(m.Label, &LabelPair{})
|
|
if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Gauge", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Gauge == nil {
|
|
m.Gauge = &Gauge{}
|
|
}
|
|
if err := m.Gauge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Counter == nil {
|
|
m.Counter = &Counter{}
|
|
}
|
|
if err := m.Counter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Summary == nil {
|
|
m.Summary = &Summary{}
|
|
}
|
|
if err := m.Summary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Untyped", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Untyped == nil {
|
|
m.Untyped = &Untyped{}
|
|
}
|
|
if err := m.Untyped.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TimestampMs", wireType)
|
|
}
|
|
m.TimestampMs = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.TimestampMs |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Histogram == nil {
|
|
m.Histogram = &Histogram{}
|
|
}
|
|
if err := m.Histogram.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MetricFamily) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MetricFamily: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MetricFamily: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Help", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Help = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
m.Type = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Type |= MetricType(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metric = append(m.Metric, &Metric{})
|
|
if err := m.Metric[len(m.Metric)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMetrics(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthMetrics
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipMetrics(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMetrics
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthMetrics
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupMetrics
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthMetrics
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group")
|
|
)
|