Merge pull request #11947 from prometheus/beorn7/protobuf
protobuf: Mark repeated fields as non-nullable
This commit is contained in:
		
						commit
						36b04efc7b
					
				|  | @ -10,6 +10,7 @@ import ( | |||
| 	math "math" | ||||
| 	math_bits "math/bits" | ||||
| 
 | ||||
| 	_ "github.com/gogo/protobuf/gogoproto" | ||||
| 	proto "github.com/gogo/protobuf/proto" | ||||
| 	types "github.com/gogo/protobuf/types" | ||||
| ) | ||||
|  | @ -283,7 +284,7 @@ func (m *Quantile) GetValue() float64 { | |||
| 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"` | ||||
| 	Quantile             []Quantile `protobuf:"bytes,3,rep,name=quantile,proto3" json:"quantile"` | ||||
| 	XXX_NoUnkeyedLiteral struct{}   `json:"-"` | ||||
| 	XXX_unrecognized     []byte     `json:"-"` | ||||
| 	XXX_sizecache        int32      `json:"-"` | ||||
|  | @ -336,7 +337,7 @@ func (m *Summary) GetSampleSum() float64 { | |||
| 	return 0 | ||||
| } | ||||
| 
 | ||||
| func (m *Summary) GetQuantile() []*Quantile { | ||||
| func (m *Summary) GetQuantile() []Quantile { | ||||
| 	if m != nil { | ||||
| 		return m.Quantile | ||||
| 	} | ||||
|  | @ -395,7 +396,7 @@ type Histogram struct { | |||
| 	SampleCountFloat float64 `protobuf:"fixed64,4,opt,name=sample_count_float,json=sampleCountFloat,proto3" json:"sample_count_float,omitempty"` | ||||
| 	SampleSum        float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum,proto3" json:"sample_sum,omitempty"` | ||||
| 	// Buckets for the conventional histogram.
 | ||||
| 	Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket,proto3" json:"bucket,omitempty"` | ||||
| 	Bucket []Bucket `protobuf:"bytes,3,rep,name=bucket,proto3" json:"bucket"` | ||||
| 	// 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.
 | ||||
|  | @ -406,14 +407,14 @@ type Histogram struct { | |||
| 	ZeroCount      uint64  `protobuf:"varint,7,opt,name=zero_count,json=zeroCount,proto3" json:"zero_count,omitempty"` | ||||
| 	ZeroCountFloat float64 `protobuf:"fixed64,8,opt,name=zero_count_float,json=zeroCountFloat,proto3" json:"zero_count_float,omitempty"` | ||||
| 	// Negative buckets for the native histogram.
 | ||||
| 	NegativeSpan []*BucketSpan `protobuf:"bytes,9,rep,name=negative_span,json=negativeSpan,proto3" json:"negative_span,omitempty"` | ||||
| 	NegativeSpan []BucketSpan `protobuf:"bytes,9,rep,name=negative_span,json=negativeSpan,proto3" json:"negative_span"` | ||||
| 	// Use either "negative_delta" or "negative_count", the former for
 | ||||
| 	// regular histograms with integer counts, the latter for float
 | ||||
| 	// histograms.
 | ||||
| 	NegativeDelta []int64   `protobuf:"zigzag64,10,rep,packed,name=negative_delta,json=negativeDelta,proto3" json:"negative_delta,omitempty"` | ||||
| 	NegativeCount []float64 `protobuf:"fixed64,11,rep,packed,name=negative_count,json=negativeCount,proto3" json:"negative_count,omitempty"` | ||||
| 	// Positive buckets for the native histogram.
 | ||||
| 	PositiveSpan []*BucketSpan `protobuf:"bytes,12,rep,name=positive_span,json=positiveSpan,proto3" json:"positive_span,omitempty"` | ||||
| 	PositiveSpan []BucketSpan `protobuf:"bytes,12,rep,name=positive_span,json=positiveSpan,proto3" json:"positive_span"` | ||||
| 	// Use either "positive_delta" or "positive_count", the former for
 | ||||
| 	// regular histograms with integer counts, the latter for float
 | ||||
| 	// histograms.
 | ||||
|  | @ -478,7 +479,7 @@ func (m *Histogram) GetSampleSum() float64 { | |||
| 	return 0 | ||||
| } | ||||
| 
 | ||||
| func (m *Histogram) GetBucket() []*Bucket { | ||||
| func (m *Histogram) GetBucket() []Bucket { | ||||
| 	if m != nil { | ||||
| 		return m.Bucket | ||||
| 	} | ||||
|  | @ -513,7 +514,7 @@ func (m *Histogram) GetZeroCountFloat() float64 { | |||
| 	return 0 | ||||
| } | ||||
| 
 | ||||
| func (m *Histogram) GetNegativeSpan() []*BucketSpan { | ||||
| func (m *Histogram) GetNegativeSpan() []BucketSpan { | ||||
| 	if m != nil { | ||||
| 		return m.NegativeSpan | ||||
| 	} | ||||
|  | @ -534,7 +535,7 @@ func (m *Histogram) GetNegativeCount() []float64 { | |||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| func (m *Histogram) GetPositiveSpan() []*BucketSpan { | ||||
| func (m *Histogram) GetPositiveSpan() []BucketSpan { | ||||
| 	if m != nil { | ||||
| 		return m.PositiveSpan | ||||
| 	} | ||||
|  | @ -688,7 +689,7 @@ func (m *BucketSpan) GetLength() uint32 { | |||
| } | ||||
| 
 | ||||
| type Exemplar struct { | ||||
| 	Label                []*LabelPair     `protobuf:"bytes,1,rep,name=label,proto3" json:"label,omitempty"` | ||||
| 	Label                []LabelPair      `protobuf:"bytes,1,rep,name=label,proto3" json:"label"` | ||||
| 	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:"-"` | ||||
|  | @ -729,7 +730,7 @@ func (m *Exemplar) XXX_DiscardUnknown() { | |||
| 
 | ||||
| var xxx_messageInfo_Exemplar proto.InternalMessageInfo | ||||
| 
 | ||||
| func (m *Exemplar) GetLabel() []*LabelPair { | ||||
| func (m *Exemplar) GetLabel() []LabelPair { | ||||
| 	if m != nil { | ||||
| 		return m.Label | ||||
| 	} | ||||
|  | @ -751,7 +752,7 @@ func (m *Exemplar) GetTimestamp() *types.Timestamp { | |||
| } | ||||
| 
 | ||||
| type Metric struct { | ||||
| 	Label                []*LabelPair `protobuf:"bytes,1,rep,name=label,proto3" json:"label,omitempty"` | ||||
| 	Label                []LabelPair `protobuf:"bytes,1,rep,name=label,proto3" json:"label"` | ||||
| 	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"` | ||||
|  | @ -796,7 +797,7 @@ func (m *Metric) XXX_DiscardUnknown() { | |||
| 
 | ||||
| var xxx_messageInfo_Metric proto.InternalMessageInfo | ||||
| 
 | ||||
| func (m *Metric) GetLabel() []*LabelPair { | ||||
| func (m *Metric) GetLabel() []LabelPair { | ||||
| 	if m != nil { | ||||
| 		return m.Label | ||||
| 	} | ||||
|  | @ -849,7 +850,7 @@ 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"` | ||||
| 	Metric               []Metric   `protobuf:"bytes,4,rep,name=metric,proto3" json:"metric"` | ||||
| 	XXX_NoUnkeyedLiteral struct{}   `json:"-"` | ||||
| 	XXX_unrecognized     []byte     `json:"-"` | ||||
| 	XXX_sizecache        int32      `json:"-"` | ||||
|  | @ -909,7 +910,7 @@ func (m *MetricFamily) GetType() MetricType { | |||
| 	return MetricType_COUNTER | ||||
| } | ||||
| 
 | ||||
| func (m *MetricFamily) GetMetric() []*Metric { | ||||
| func (m *MetricFamily) GetMetric() []Metric { | ||||
| 	if m != nil { | ||||
| 		return m.Metric | ||||
| 	} | ||||
|  | @ -937,63 +938,65 @@ func init() { | |||
| } | ||||
| 
 | ||||
| var fileDescriptor_d1e5ddb18987a258 = []byte{ | ||||
| 	// 894 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdd, 0x6e, 0xe3, 0x44, | ||||
| 	0x18, 0xc5, 0xcd, 0xaf, 0xbf, 0x34, 0xdd, 0xec, 0x50, 0xad, 0xac, 0x42, 0xdb, 0x60, 0x09, 0xa9, | ||||
| 	0x20, 0xe4, 0x08, 0xe8, 0x0a, 0x84, 0xe0, 0xa2, 0xdd, 0xcd, 0x76, 0x91, 0xc8, 0xee, 0x32, 0x49, | ||||
| 	0x2e, 0x16, 0x2e, 0xac, 0x49, 0x3a, 0x4d, 0x2c, 0x3c, 0x1e, 0x63, 0x8f, 0x57, 0x94, 0x17, 0xe0, | ||||
| 	0x9a, 0x57, 0xe0, 0x61, 0x10, 0x97, 0x3c, 0x02, 0x2a, 0x0f, 0x02, 0x9a, 0x3f, 0xbb, 0x59, 0x39, | ||||
| 	0xcb, 0xb2, 0x77, 0x99, 0xe3, 0x73, 0xbe, 0x39, 0x67, 0x3c, 0x39, 0x06, 0x3f, 0xe2, 0xa3, 0x34, | ||||
| 	0xe3, 0x8c, 0x8a, 0x35, 0x2d, 0xf2, 0xd1, 0x32, 0x8e, 0x68, 0x22, 0x46, 0x8c, 0x8a, 0x2c, 0x5a, | ||||
| 	0xe6, 0x41, 0x9a, 0x71, 0xc1, 0xd1, 0x7e, 0xc4, 0x83, 0x8a, 0x13, 0x68, 0xce, 0xc1, 0xf1, 0x8a, | ||||
| 	0xf3, 0x55, 0x4c, 0x47, 0x8a, 0xb3, 0x28, 0xae, 0x46, 0x22, 0x62, 0x34, 0x17, 0x84, 0xa5, 0x5a, | ||||
| 	0xe6, 0xdf, 0x07, 0xf7, 0x1b, 0xb2, 0xa0, 0xf1, 0x33, 0x12, 0x65, 0x08, 0x41, 0x33, 0x21, 0x8c, | ||||
| 	0x7a, 0xce, 0xd0, 0x39, 0x71, 0xb1, 0xfa, 0x8d, 0xf6, 0xa1, 0xf5, 0x82, 0xc4, 0x05, 0xf5, 0x76, | ||||
| 	0x14, 0xa8, 0x17, 0xfe, 0x21, 0xb4, 0x2e, 0x48, 0xb1, 0xba, 0xf5, 0x58, 0x6a, 0x1c, 0xfb, 0xf8, | ||||
| 	0x7b, 0xe8, 0x3c, 0xe0, 0x45, 0x22, 0x68, 0x56, 0x4f, 0x40, 0x5f, 0x40, 0x97, 0xfe, 0x44, 0x59, | ||||
| 	0x1a, 0x93, 0x4c, 0x0d, 0xee, 0x7d, 0x72, 0x14, 0xd4, 0x05, 0x08, 0xc6, 0x86, 0x85, 0x4b, 0xbe, | ||||
| 	0xff, 0x25, 0x74, 0xbf, 0x2d, 0x48, 0x22, 0xa2, 0x98, 0xa2, 0x03, 0xe8, 0xfe, 0x68, 0x7e, 0x9b, | ||||
| 	0x0d, 0xca, 0xf5, 0xa6, 0xf3, 0xd2, 0xda, 0x2f, 0x0e, 0x74, 0xa6, 0x05, 0x63, 0x24, 0xbb, 0x46, | ||||
| 	0xef, 0xc1, 0x6e, 0x4e, 0x58, 0x1a, 0xd3, 0x70, 0x29, 0xdd, 0xaa, 0x09, 0x4d, 0xdc, 0xd3, 0x98, | ||||
| 	0x0a, 0x80, 0x0e, 0x01, 0x0c, 0x25, 0x2f, 0x98, 0x99, 0xe4, 0x6a, 0x64, 0x5a, 0x30, 0x99, 0xa3, | ||||
| 	0xdc, 0xbf, 0x31, 0x6c, 0x6c, 0xcf, 0x61, 0x1d, 0x57, 0xfe, 0xfc, 0x63, 0xe8, 0xcc, 0x13, 0x71, | ||||
| 	0x9d, 0xd2, 0xcb, 0x2d, 0xa7, 0xf8, 0x77, 0x13, 0xdc, 0xc7, 0x51, 0x2e, 0xf8, 0x2a, 0x23, 0xec, | ||||
| 	0x75, 0xcc, 0x7e, 0x04, 0xe8, 0x36, 0x25, 0xbc, 0x8a, 0x39, 0x11, 0x5e, 0x53, 0xcd, 0x1c, 0xdc, | ||||
| 	0x22, 0x3e, 0x92, 0xf8, 0x7f, 0x45, 0x3b, 0x85, 0xf6, 0xa2, 0x58, 0xfe, 0x40, 0x85, 0x09, 0xf6, | ||||
| 	0x6e, 0x7d, 0xb0, 0x73, 0xc5, 0xc1, 0x86, 0x8b, 0xee, 0x41, 0x3b, 0x5f, 0xae, 0x29, 0x23, 0x5e, | ||||
| 	0x6b, 0xe8, 0x9c, 0xdc, 0xc5, 0x66, 0x85, 0xde, 0x87, 0xbd, 0x9f, 0x69, 0xc6, 0x43, 0xb1, 0xce, | ||||
| 	0x68, 0xbe, 0xe6, 0xf1, 0xa5, 0xd7, 0x56, 0x1b, 0xf6, 0x25, 0x3a, 0xb3, 0xa0, 0xf4, 0xa4, 0x68, | ||||
| 	0x3a, 0x62, 0x47, 0x45, 0x74, 0x25, 0xa2, 0x03, 0x9e, 0xc0, 0xa0, 0x7a, 0x6c, 0xe2, 0x75, 0xd5, | ||||
| 	0x9c, 0xbd, 0x92, 0xa4, 0xc3, 0x8d, 0xa1, 0x9f, 0xd0, 0x15, 0x11, 0xd1, 0x0b, 0x1a, 0xe6, 0x29, | ||||
| 	0x49, 0x3c, 0x57, 0x85, 0x18, 0xbe, 0x2a, 0xc4, 0x34, 0x25, 0x09, 0xde, 0xb5, 0x32, 0xb9, 0x92, | ||||
| 	0xb6, 0xcb, 0x31, 0x97, 0x34, 0x16, 0xc4, 0x83, 0x61, 0xe3, 0x04, 0xe1, 0x72, 0xf8, 0x43, 0x09, | ||||
| 	0x6e, 0xd0, 0xb4, 0xf5, 0xde, 0xb0, 0x21, 0xd3, 0x59, 0x54, 0xdb, 0x1f, 0x43, 0x3f, 0xe5, 0x79, | ||||
| 	0x54, 0x99, 0xda, 0x7d, 0x5d, 0x53, 0x56, 0x66, 0x4d, 0x95, 0x63, 0xb4, 0xa9, 0xbe, 0x36, 0x65, | ||||
| 	0xd1, 0xd2, 0x54, 0x49, 0xd3, 0xa6, 0xf6, 0xb4, 0x29, 0x8b, 0x2a, 0x53, 0xfe, 0xef, 0x0e, 0xb4, | ||||
| 	0xf5, 0x56, 0xe8, 0x03, 0x18, 0x2c, 0x0b, 0x56, 0xc4, 0xb7, 0x83, 0xe8, 0x6b, 0x76, 0xa7, 0xc2, | ||||
| 	0x75, 0x94, 0x53, 0xb8, 0xf7, 0x32, 0x75, 0xe3, 0xba, 0xed, 0xbf, 0x24, 0xd0, 0x6f, 0xe5, 0x18, | ||||
| 	0x7a, 0x45, 0x9a, 0xd2, 0x2c, 0x5c, 0xf0, 0x22, 0xb9, 0x34, 0x77, 0x0e, 0x14, 0x74, 0x2e, 0x91, | ||||
| 	0x8d, 0x5e, 0x68, 0xfc, 0xef, 0x5e, 0x80, 0xea, 0xc8, 0xe4, 0x45, 0xe4, 0x57, 0x57, 0x39, 0xd5, | ||||
| 	0x09, 0xee, 0x62, 0xb3, 0x92, 0x78, 0x4c, 0x93, 0x95, 0x58, 0xab, 0xdd, 0xfb, 0xd8, 0xac, 0xfc, | ||||
| 	0x5f, 0x1d, 0xe8, 0xda, 0xa1, 0xe8, 0x3e, 0xb4, 0x62, 0xd9, 0x8a, 0x9e, 0xa3, 0x5e, 0xd0, 0x71, | ||||
| 	0xbd, 0x87, 0xb2, 0x38, 0xb1, 0x66, 0xd7, 0x37, 0x0e, 0xfa, 0x1c, 0xdc, 0xb2, 0x75, 0x4d, 0xa8, | ||||
| 	0x83, 0x40, 0xf7, 0x72, 0x60, 0x7b, 0x39, 0x98, 0x59, 0x06, 0xae, 0xc8, 0xfe, 0x3f, 0x3b, 0xd0, | ||||
| 	0x9e, 0xa8, 0x96, 0x7f, 0x53, 0x47, 0x1f, 0x43, 0x6b, 0x25, 0x7b, 0xda, 0x94, 0xec, 0x3b, 0xf5, | ||||
| 	0x32, 0x55, 0xe5, 0x58, 0x33, 0xd1, 0x67, 0xd0, 0x59, 0xea, 0xee, 0x36, 0x66, 0x0f, 0xeb, 0x45, | ||||
| 	0xa6, 0xe0, 0xb1, 0x65, 0x4b, 0x61, 0xae, 0x8b, 0x55, 0xdd, 0x81, 0xad, 0x42, 0xd3, 0xbe, 0xd8, | ||||
| 	0xb2, 0xa5, 0xb0, 0xd0, 0x45, 0xa8, 0x4a, 0x63, 0xab, 0xd0, 0xb4, 0x25, 0xb6, 0x6c, 0xf4, 0x15, | ||||
| 	0xb8, 0x6b, 0xdb, 0x8f, 0xaa, 0x2c, 0xb6, 0x1e, 0x4c, 0x59, 0xa3, 0xb8, 0x52, 0xc8, 0x46, 0x2d, | ||||
| 	0xcf, 0x3a, 0x64, 0xb9, 0x6a, 0xa4, 0x06, 0xee, 0x95, 0xd8, 0x24, 0xf7, 0x7f, 0x73, 0x60, 0x57, | ||||
| 	0xbf, 0x81, 0x47, 0x84, 0x45, 0xf1, 0x75, 0xed, 0x27, 0x12, 0x41, 0x73, 0x4d, 0xe3, 0xd4, 0x7c, | ||||
| 	0x21, 0xd5, 0x6f, 0x74, 0x0a, 0x4d, 0xe9, 0x51, 0x1d, 0xe1, 0xde, 0xb6, 0x7f, 0xb8, 0x9e, 0x3c, | ||||
| 	0xbb, 0x4e, 0x29, 0x56, 0x6c, 0xd9, 0xb9, 0xfa, 0xab, 0xee, 0x35, 0x5f, 0xd5, 0xb9, 0x5a, 0x87, | ||||
| 	0x0d, 0xf7, 0xc3, 0x05, 0x40, 0x35, 0x09, 0xf5, 0xa0, 0xf3, 0xe0, 0xe9, 0xfc, 0xc9, 0x6c, 0x8c, | ||||
| 	0x07, 0x6f, 0x21, 0x17, 0x5a, 0x17, 0x67, 0xf3, 0x8b, 0xf1, 0xc0, 0x91, 0xf8, 0x74, 0x3e, 0x99, | ||||
| 	0x9c, 0xe1, 0xe7, 0x83, 0x1d, 0xb9, 0x98, 0x3f, 0x99, 0x3d, 0x7f, 0x36, 0x7e, 0x38, 0x68, 0xa0, | ||||
| 	0x3e, 0xb8, 0x8f, 0xbf, 0x9e, 0xce, 0x9e, 0x5e, 0xe0, 0xb3, 0xc9, 0xa0, 0x89, 0xde, 0x86, 0x3b, | ||||
| 	0x4a, 0x13, 0x56, 0x60, 0xeb, 0xdc, 0xff, 0xe3, 0xe6, 0xc8, 0xf9, 0xf3, 0xe6, 0xc8, 0xf9, 0xeb, | ||||
| 	0xe6, 0xc8, 0xf9, 0x6e, 0x3f, 0xe2, 0x61, 0x65, 0x2b, 0xd4, 0xb6, 0x16, 0x6d, 0x75, 0x9b, 0x3f, | ||||
| 	0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xbc, 0x25, 0x8b, 0xaf, 0x08, 0x00, 0x00, | ||||
| 	// 923 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x8e, 0xdb, 0x44, | ||||
| 	0x18, 0xad, 0x1b, 0xe7, 0xc7, 0x5f, 0x36, 0xdb, 0x74, 0x88, 0x2a, 0x6b, 0x61, 0x37, 0xc1, 0x12, | ||||
| 	0xd2, 0x82, 0x50, 0x22, 0xa0, 0x08, 0x54, 0x40, 0x62, 0xb7, 0xdd, 0x6e, 0x51, 0x49, 0x5b, 0x26, | ||||
| 	0xc9, 0x45, 0xe1, 0xc2, 0x9a, 0x64, 0x67, 0x1d, 0x0b, 0xdb, 0x63, 0xec, 0x71, 0xc5, 0x72, 0xcf, | ||||
| 	0x25, 0xd7, 0xbc, 0x02, 0x4f, 0x82, 0x7a, 0xc9, 0x13, 0x20, 0xb4, 0xef, 0xc0, 0x3d, 0x9a, 0x3f, | ||||
| 	0x3b, 0x5b, 0x39, 0x85, 0x15, 0x77, 0x33, 0xc7, 0xe7, 0xfb, 0xe6, 0x9c, 0x99, 0xc9, 0x99, 0x80, | ||||
| 	0x17, 0xb2, 0x49, 0x9a, 0xb1, 0x98, 0xf2, 0x35, 0x2d, 0xf2, 0xc9, 0x2a, 0x0a, 0x69, 0xc2, 0x27, | ||||
| 	0x31, 0xe5, 0x59, 0xb8, 0xca, 0xc7, 0x69, 0xc6, 0x38, 0x43, 0x83, 0x90, 0x8d, 0x2b, 0xce, 0x58, | ||||
| 	0x71, 0xf6, 0x06, 0x01, 0x0b, 0x98, 0x24, 0x4c, 0xc4, 0x48, 0x71, 0xf7, 0x86, 0x01, 0x63, 0x41, | ||||
| 	0x44, 0x27, 0x72, 0xb6, 0x2c, 0xce, 0x27, 0x3c, 0x8c, 0x69, 0xce, 0x49, 0x9c, 0x2a, 0x82, 0xf7, | ||||
| 	0x31, 0x38, 0x5f, 0x93, 0x25, 0x8d, 0x9e, 0x91, 0x30, 0x43, 0x08, 0xec, 0x84, 0xc4, 0xd4, 0xb5, | ||||
| 	0x46, 0xd6, 0xa1, 0x83, 0xe5, 0x18, 0x0d, 0xa0, 0xf9, 0x82, 0x44, 0x05, 0x75, 0x6f, 0x4a, 0x50, | ||||
| 	0x4d, 0xbc, 0x7d, 0x68, 0x9e, 0x92, 0x22, 0xd8, 0xf8, 0x2c, 0x6a, 0x2c, 0xf3, 0xf9, 0x3b, 0x68, | ||||
| 	0xdf, 0x67, 0x45, 0xc2, 0x69, 0x56, 0x4f, 0x40, 0xf7, 0xa0, 0x43, 0x7f, 0xa4, 0x71, 0x1a, 0x91, | ||||
| 	0x4c, 0x36, 0xee, 0x7e, 0x78, 0x30, 0xae, 0xb3, 0x35, 0x3e, 0xd1, 0x2c, 0x5c, 0xf2, 0xbd, 0xcf, | ||||
| 	0xa1, 0xf3, 0x4d, 0x41, 0x12, 0x1e, 0x46, 0x14, 0xed, 0x41, 0xe7, 0x07, 0x3d, 0xd6, 0x0b, 0x94, | ||||
| 	0xf3, 0xab, 0xca, 0x4b, 0x69, 0xbf, 0x58, 0xd0, 0x9e, 0x15, 0x71, 0x4c, 0xb2, 0x0b, 0xf4, 0x36, | ||||
| 	0xec, 0xe4, 0x24, 0x4e, 0x23, 0xea, 0xaf, 0x84, 0x5a, 0xd9, 0xc1, 0xc6, 0x5d, 0x85, 0x49, 0x03, | ||||
| 	0x68, 0x1f, 0x40, 0x53, 0xf2, 0x22, 0xd6, 0x9d, 0x1c, 0x85, 0xcc, 0x8a, 0x18, 0x7d, 0xb9, 0xb1, | ||||
| 	0x7e, 0x63, 0xd4, 0xd8, 0xee, 0xc3, 0x28, 0x3e, 0xb6, 0x5f, 0xfe, 0x39, 0xbc, 0x51, 0xa9, 0xf4, | ||||
| 	0x86, 0xd0, 0x5e, 0x24, 0xfc, 0x22, 0xa5, 0x67, 0x5b, 0xf6, 0xf2, 0x6f, 0x1b, 0x9c, 0x47, 0x61, | ||||
| 	0xce, 0x59, 0x90, 0x91, 0xf8, 0xbf, 0x48, 0x7e, 0x1f, 0xd0, 0x26, 0xc5, 0x3f, 0x8f, 0x18, 0xe1, | ||||
| 	0xae, 0x2d, 0x7b, 0xf6, 0x37, 0x88, 0x0f, 0x05, 0xfe, 0x6f, 0x06, 0xef, 0x41, 0x6b, 0x59, 0xac, | ||||
| 	0xbe, 0xa7, 0x5c, 0xdb, 0x7b, 0xab, 0xde, 0xde, 0xb1, 0xe4, 0x68, 0x73, 0xba, 0x02, 0xdd, 0x81, | ||||
| 	0x56, 0xbe, 0x5a, 0xd3, 0x98, 0xb8, 0xcd, 0x91, 0x75, 0x78, 0x1b, 0xeb, 0x19, 0x7a, 0x07, 0x76, | ||||
| 	0x7f, 0xa2, 0x19, 0xf3, 0xf9, 0x3a, 0xa3, 0xf9, 0x9a, 0x45, 0x67, 0x6e, 0x4b, 0x2e, 0xdb, 0x13, | ||||
| 	0xe8, 0xdc, 0x80, 0x42, 0x99, 0xa4, 0x29, 0xa3, 0x6d, 0x69, 0xd4, 0x11, 0x88, 0xb2, 0x79, 0x08, | ||||
| 	0xfd, 0xea, 0xb3, 0x36, 0xd9, 0x91, 0x7d, 0x76, 0x4b, 0x92, 0xb2, 0xf8, 0x18, 0x7a, 0x09, 0x0d, | ||||
| 	0x08, 0x0f, 0x5f, 0x50, 0x3f, 0x4f, 0x49, 0xe2, 0x3a, 0xd2, 0xca, 0xe8, 0x75, 0x56, 0x66, 0x29, | ||||
| 	0x49, 0xb4, 0x9d, 0x1d, 0x53, 0x2c, 0x30, 0x21, 0xbe, 0x6c, 0x76, 0x46, 0x23, 0x4e, 0x5c, 0x18, | ||||
| 	0x35, 0x0e, 0x11, 0x2e, 0x97, 0x78, 0x20, 0xc0, 0x2b, 0x34, 0x65, 0xa0, 0x3b, 0x6a, 0x08, 0x8f, | ||||
| 	0x06, 0x55, 0x26, 0x1e, 0x43, 0x2f, 0x65, 0x79, 0x58, 0x49, 0xdb, 0xb9, 0x9e, 0x34, 0x53, 0x6c, | ||||
| 	0xa4, 0x95, 0xcd, 0x94, 0xb4, 0x9e, 0x92, 0x66, 0xd0, 0x52, 0x5a, 0x49, 0x53, 0xd2, 0x76, 0x95, | ||||
| 	0x34, 0x83, 0x4a, 0x69, 0xde, 0xef, 0x16, 0xb4, 0xd4, 0x82, 0xe8, 0x5d, 0xe8, 0xaf, 0x8a, 0xb8, | ||||
| 	0x88, 0x36, 0xed, 0xa8, 0x8b, 0x77, 0xab, 0xc2, 0x95, 0xa1, 0xbb, 0x70, 0xe7, 0x55, 0xea, 0x95, | ||||
| 	0x0b, 0x38, 0x78, 0xa5, 0x40, 0x9d, 0xd0, 0x10, 0xba, 0x45, 0x9a, 0xd2, 0xcc, 0x5f, 0xb2, 0x22, | ||||
| 	0x39, 0xd3, 0xb7, 0x10, 0x24, 0x74, 0x2c, 0x90, 0x2b, 0x79, 0xd1, 0xb8, 0x76, 0x5e, 0x40, 0xb5, | ||||
| 	0x71, 0xe2, 0x52, 0xb2, 0xf3, 0xf3, 0x9c, 0x2a, 0x07, 0xb7, 0xb1, 0x9e, 0x09, 0x3c, 0xa2, 0x49, | ||||
| 	0xc0, 0xd7, 0x72, 0xf5, 0x1e, 0xd6, 0x33, 0xef, 0x57, 0x0b, 0x3a, 0xa6, 0x29, 0xfa, 0x0c, 0x9a, | ||||
| 	0x91, 0x48, 0x4b, 0xd7, 0x92, 0xc7, 0x34, 0xac, 0xd7, 0x50, 0x06, 0xaa, 0x3e, 0x25, 0x55, 0x53, | ||||
| 	0x9f, 0x47, 0xe8, 0x53, 0x70, 0xca, 0x4c, 0xd6, 0xd6, 0xf6, 0xc6, 0x2a, 0xb5, 0xc7, 0x26, 0xb5, | ||||
| 	0xc7, 0x73, 0xc3, 0xc0, 0x15, 0xd9, 0xfb, 0xb9, 0x01, 0xad, 0xa9, 0x7c, 0x19, 0xfe, 0x9f, 0xae, | ||||
| 	0x0f, 0xa0, 0x19, 0x88, 0x2c, 0xd7, 0x41, 0xfc, 0x66, 0x7d, 0xb1, 0x8c, 0x7b, 0xac, 0x98, 0xe8, | ||||
| 	0x13, 0x68, 0xaf, 0x54, 0xbe, 0x6b, 0xc9, 0xfb, 0xf5, 0x45, 0xfa, 0x11, 0xc0, 0x86, 0x2d, 0x0a, | ||||
| 	0x73, 0x15, 0xbe, 0xf2, 0x3e, 0x6c, 0x2d, 0xd4, 0x09, 0x8d, 0x0d, 0x5b, 0x14, 0x16, 0x2a, 0x26, | ||||
| 	0x65, 0x98, 0x6c, 0x2d, 0xd4, 0x59, 0x8a, 0x0d, 0x1b, 0x7d, 0x01, 0xce, 0xda, 0xa4, 0xa7, 0x0c, | ||||
| 	0x91, 0xad, 0xdb, 0x53, 0x86, 0x2c, 0xae, 0x2a, 0x44, 0xde, 0x96, 0x3b, 0xee, 0xc7, 0xb9, 0x4c, | ||||
| 	0xaa, 0x06, 0xee, 0x96, 0xd8, 0x34, 0xf7, 0x7e, 0xb3, 0x60, 0x47, 0x9d, 0xc3, 0x43, 0x12, 0x87, | ||||
| 	0xd1, 0x45, 0xed, 0x33, 0x8a, 0xc0, 0x5e, 0xd3, 0x28, 0xd5, 0xaf, 0xa8, 0x1c, 0xa3, 0xbb, 0x60, | ||||
| 	0x0b, 0x8d, 0x72, 0x0b, 0x77, 0xb7, 0xfd, 0xe6, 0x55, 0xe7, 0xf9, 0x45, 0x4a, 0xb1, 0x64, 0x8b, | ||||
| 	0x44, 0x56, 0xff, 0x07, 0x5c, 0xfb, 0x75, 0x89, 0xac, 0xea, 0x4c, 0x22, 0xab, 0x8a, 0xf7, 0x96, | ||||
| 	0x00, 0x55, 0x3f, 0xd4, 0x85, 0xf6, 0xfd, 0xa7, 0x8b, 0x27, 0xf3, 0x13, 0xdc, 0xbf, 0x81, 0x1c, | ||||
| 	0x68, 0x9e, 0x1e, 0x2d, 0x4e, 0x4f, 0xfa, 0x96, 0xc0, 0x67, 0x8b, 0xe9, 0xf4, 0x08, 0x3f, 0xef, | ||||
| 	0xdf, 0x14, 0x93, 0xc5, 0x93, 0xf9, 0xf3, 0x67, 0x27, 0x0f, 0xfa, 0x0d, 0xd4, 0x03, 0xe7, 0xd1, | ||||
| 	0x57, 0xb3, 0xf9, 0xd3, 0x53, 0x7c, 0x34, 0xed, 0xdb, 0xe8, 0x0d, 0xb8, 0x25, 0x6b, 0xfc, 0x0a, | ||||
| 	0x6c, 0x1e, 0x7b, 0x2f, 0x2f, 0x0f, 0xac, 0x3f, 0x2e, 0x0f, 0xac, 0xbf, 0x2e, 0x0f, 0xac, 0x6f, | ||||
| 	0x07, 0x21, 0xf3, 0x2b, 0x71, 0xbe, 0x12, 0xb7, 0x6c, 0xc9, 0x9b, 0xfd, 0xd1, 0x3f, 0x01, 0x00, | ||||
| 	0x00, 0xff, 0xff, 0x52, 0x2d, 0xb5, 0x31, 0xef, 0x08, 0x00, 0x00, | ||||
| } | ||||
| 
 | ||||
| func (m *LabelPair) Marshal() (dAtA []byte, err error) { | ||||
|  | @ -2496,7 +2499,7 @@ func (m *Summary) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Quantile = append(m.Quantile, &Quantile{}) | ||||
| 			m.Quantile = append(m.Quantile, Quantile{}) | ||||
| 			if err := m.Quantile[len(m.Quantile)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  | @ -2673,7 +2676,7 @@ func (m *Histogram) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Bucket = append(m.Bucket, &Bucket{}) | ||||
| 			m.Bucket = append(m.Bucket, Bucket{}) | ||||
| 			if err := m.Bucket[len(m.Bucket)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  | @ -2780,7 +2783,7 @@ func (m *Histogram) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.NegativeSpan = append(m.NegativeSpan, &BucketSpan{}) | ||||
| 			m.NegativeSpan = append(m.NegativeSpan, BucketSpan{}) | ||||
| 			if err := m.NegativeSpan[len(m.NegativeSpan)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  | @ -2946,7 +2949,7 @@ func (m *Histogram) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.PositiveSpan = append(m.PositiveSpan, &BucketSpan{}) | ||||
| 			m.PositiveSpan = append(m.PositiveSpan, BucketSpan{}) | ||||
| 			if err := m.PositiveSpan[len(m.PositiveSpan)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  | @ -3382,7 +3385,7 @@ func (m *Exemplar) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Label = append(m.Label, &LabelPair{}) | ||||
| 			m.Label = append(m.Label, LabelPair{}) | ||||
| 			if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  | @ -3514,7 +3517,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Label = append(m.Label, &LabelPair{}) | ||||
| 			m.Label = append(m.Label, LabelPair{}) | ||||
| 			if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  | @ -3881,7 +3884,7 @@ func (m *MetricFamily) Unmarshal(dAtA []byte) error { | |||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Metric = append(m.Metric, &Metric{}) | ||||
| 			m.Metric = append(m.Metric, Metric{}) | ||||
| 			if err := m.Metric[len(m.Metric)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ syntax = "proto3"; | |||
| package io.prometheus.client; | ||||
| option go_package = "io_prometheus_client"; | ||||
| 
 | ||||
| import "gogoproto/gogo.proto"; | ||||
| import "google/protobuf/timestamp.proto"; | ||||
| 
 | ||||
| message LabelPair { | ||||
|  | @ -60,7 +61,7 @@ message Quantile { | |||
| message Summary { | ||||
|   uint64            sample_count = 1; | ||||
|   double            sample_sum   = 2; | ||||
|   repeated Quantile quantile     = 3; | ||||
|   repeated Quantile quantile     = 3 [(gogoproto.nullable) = false]; | ||||
| } | ||||
| 
 | ||||
| message Untyped { | ||||
|  | @ -72,7 +73,7 @@ message Histogram { | |||
|   double sample_count_float = 4; // Overrides sample_count if > 0. | ||||
|   double sample_sum         = 2; | ||||
|   // Buckets for the conventional histogram. | ||||
|   repeated Bucket bucket    = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional. | ||||
|   repeated Bucket bucket = 3 [(gogoproto.nullable) = false]; // Ordered in increasing order of upper_bound, +Inf bucket is optional. | ||||
| 
 | ||||
|   // Everything below here is for native histograms (also known as sparse histograms). | ||||
|   // Native histograms are an experimental feature without stability guarantees. | ||||
|  | @ -88,7 +89,7 @@ message Histogram { | |||
|   double zero_count_float = 8; // Overrides sb_zero_count if > 0. | ||||
| 
 | ||||
|   // Negative buckets for the native histogram. | ||||
|   repeated BucketSpan negative_span =  9; | ||||
|   repeated BucketSpan negative_span = 9 [(gogoproto.nullable) = false]; | ||||
|   // Use either "negative_delta" or "negative_count", the former for | ||||
|   // regular histograms with integer counts, the latter for float | ||||
|   // histograms. | ||||
|  | @ -96,7 +97,7 @@ message Histogram { | |||
|   repeated double negative_count = 11; // Absolute count of each bucket. | ||||
| 
 | ||||
|   // Positive buckets for the native histogram. | ||||
|   repeated BucketSpan positive_span = 12; | ||||
|   repeated BucketSpan positive_span = 12 [(gogoproto.nullable) = false]; | ||||
|   // Use either "positive_delta" or "positive_count", the former for | ||||
|   // regular histograms with integer counts, the latter for float | ||||
|   // histograms. | ||||
|  | @ -123,13 +124,13 @@ message BucketSpan { | |||
| } | ||||
| 
 | ||||
| message Exemplar { | ||||
|   repeated LabelPair                 label     = 1; | ||||
|   repeated LabelPair        label     = 1 [(gogoproto.nullable) = false]; | ||||
|   double                    value     = 2; | ||||
|   google.protobuf.Timestamp timestamp = 3; // OpenMetrics-style. | ||||
| } | ||||
| 
 | ||||
| message Metric { | ||||
|   repeated LabelPair label = 1; | ||||
|   repeated LabelPair label        = 1 [(gogoproto.nullable) = false]; | ||||
|   Gauge              gauge        = 2; | ||||
|   Counter            counter      = 3; | ||||
|   Summary            summary      = 4; | ||||
|  | @ -142,5 +143,5 @@ message MetricFamily { | |||
|   string          name   = 1; | ||||
|   string          help   = 2; | ||||
|   MetricType      type   = 3; | ||||
|   repeated Metric metric = 4; | ||||
|   repeated Metric metric = 4 [(gogoproto.nullable) = false]; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue