forked from yext/cloudprober
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist.pb.go
257 lines (228 loc) · 8.95 KB
/
dist.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/google/cloudprober/metrics/proto/dist.proto
package proto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
// Dist defines a Distribution data type.
type Dist struct {
// Types that are valid to be assigned to Buckets:
// *Dist_ExplicitBuckets
// *Dist_ExponentialBuckets
Buckets isDist_Buckets `protobuf_oneof:"buckets"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Dist) Reset() { *m = Dist{} }
func (m *Dist) String() string { return proto.CompactTextString(m) }
func (*Dist) ProtoMessage() {}
func (*Dist) Descriptor() ([]byte, []int) {
return fileDescriptor_dist_4ea0c9d5cb515dca, []int{0}
}
func (m *Dist) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Dist.Unmarshal(m, b)
}
func (m *Dist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Dist.Marshal(b, m, deterministic)
}
func (dst *Dist) XXX_Merge(src proto.Message) {
xxx_messageInfo_Dist.Merge(dst, src)
}
func (m *Dist) XXX_Size() int {
return xxx_messageInfo_Dist.Size(m)
}
func (m *Dist) XXX_DiscardUnknown() {
xxx_messageInfo_Dist.DiscardUnknown(m)
}
var xxx_messageInfo_Dist proto.InternalMessageInfo
type isDist_Buckets interface {
isDist_Buckets()
}
type Dist_ExplicitBuckets struct {
ExplicitBuckets string `protobuf:"bytes,1,opt,name=explicit_buckets,json=explicitBuckets,oneof"`
}
type Dist_ExponentialBuckets struct {
ExponentialBuckets *ExponentialBuckets `protobuf:"bytes,2,opt,name=exponential_buckets,json=exponentialBuckets,oneof"`
}
func (*Dist_ExplicitBuckets) isDist_Buckets() {}
func (*Dist_ExponentialBuckets) isDist_Buckets() {}
func (m *Dist) GetBuckets() isDist_Buckets {
if m != nil {
return m.Buckets
}
return nil
}
func (m *Dist) GetExplicitBuckets() string {
if x, ok := m.GetBuckets().(*Dist_ExplicitBuckets); ok {
return x.ExplicitBuckets
}
return ""
}
func (m *Dist) GetExponentialBuckets() *ExponentialBuckets {
if x, ok := m.GetBuckets().(*Dist_ExponentialBuckets); ok {
return x.ExponentialBuckets
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Dist) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Dist_OneofMarshaler, _Dist_OneofUnmarshaler, _Dist_OneofSizer, []interface{}{
(*Dist_ExplicitBuckets)(nil),
(*Dist_ExponentialBuckets)(nil),
}
}
func _Dist_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Dist)
// buckets
switch x := m.Buckets.(type) {
case *Dist_ExplicitBuckets:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.ExplicitBuckets)
case *Dist_ExponentialBuckets:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ExponentialBuckets); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Dist.Buckets has unexpected type %T", x)
}
return nil
}
func _Dist_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Dist)
switch tag {
case 1: // buckets.explicit_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Buckets = &Dist_ExplicitBuckets{x}
return true, err
case 2: // buckets.exponential_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ExponentialBuckets)
err := b.DecodeMessage(msg)
m.Buckets = &Dist_ExponentialBuckets{msg}
return true, err
default:
return false, nil
}
}
func _Dist_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Dist)
// buckets
switch x := m.Buckets.(type) {
case *Dist_ExplicitBuckets:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.ExplicitBuckets)))
n += len(x.ExplicitBuckets)
case *Dist_ExponentialBuckets:
s := proto.Size(x.ExponentialBuckets)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// ExponentialBucket defines a set of num_buckets+2 buckets:
// bucket[0] covers (−Inf, 0)
// bucket[1] covers [0, scale_factor)
// bucket[2] covers [scale_factor, scale_factor*base)
// ...
// bucket[i] covers [scale_factor*base^(i−2), scale_factor*base^(i−1))
// ...
// bucket[num_buckets+1] covers [scale_factor*base^(num_buckets−1), +Inf)
// NB: Base must be at least 1.01.
type ExponentialBuckets struct {
ScaleFactor *float32 `protobuf:"fixed32,1,opt,name=scale_factor,json=scaleFactor,def=1" json:"scale_factor,omitempty"`
Base *float32 `protobuf:"fixed32,2,opt,name=base,def=2" json:"base,omitempty"`
NumBuckets *uint32 `protobuf:"varint,3,opt,name=num_buckets,json=numBuckets,def=20" json:"num_buckets,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExponentialBuckets) Reset() { *m = ExponentialBuckets{} }
func (m *ExponentialBuckets) String() string { return proto.CompactTextString(m) }
func (*ExponentialBuckets) ProtoMessage() {}
func (*ExponentialBuckets) Descriptor() ([]byte, []int) {
return fileDescriptor_dist_4ea0c9d5cb515dca, []int{1}
}
func (m *ExponentialBuckets) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExponentialBuckets.Unmarshal(m, b)
}
func (m *ExponentialBuckets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExponentialBuckets.Marshal(b, m, deterministic)
}
func (dst *ExponentialBuckets) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExponentialBuckets.Merge(dst, src)
}
func (m *ExponentialBuckets) XXX_Size() int {
return xxx_messageInfo_ExponentialBuckets.Size(m)
}
func (m *ExponentialBuckets) XXX_DiscardUnknown() {
xxx_messageInfo_ExponentialBuckets.DiscardUnknown(m)
}
var xxx_messageInfo_ExponentialBuckets proto.InternalMessageInfo
const Default_ExponentialBuckets_ScaleFactor float32 = 1
const Default_ExponentialBuckets_Base float32 = 2
const Default_ExponentialBuckets_NumBuckets uint32 = 20
func (m *ExponentialBuckets) GetScaleFactor() float32 {
if m != nil && m.ScaleFactor != nil {
return *m.ScaleFactor
}
return Default_ExponentialBuckets_ScaleFactor
}
func (m *ExponentialBuckets) GetBase() float32 {
if m != nil && m.Base != nil {
return *m.Base
}
return Default_ExponentialBuckets_Base
}
func (m *ExponentialBuckets) GetNumBuckets() uint32 {
if m != nil && m.NumBuckets != nil {
return *m.NumBuckets
}
return Default_ExponentialBuckets_NumBuckets
}
func init() {
proto.RegisterType((*Dist)(nil), "cloudprober.metrics.Dist")
proto.RegisterType((*ExponentialBuckets)(nil), "cloudprober.metrics.ExponentialBuckets")
}
func init() {
proto.RegisterFile("github.com/google/cloudprober/metrics/proto/dist.proto", fileDescriptor_dist_4ea0c9d5cb515dca)
}
var fileDescriptor_dist_4ea0c9d5cb515dca = []byte{
// 245 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x8e, 0xc1, 0x4b, 0xc3, 0x30,
0x18, 0xc5, 0x97, 0x3a, 0x90, 0x7d, 0x53, 0x94, 0x0c, 0xc1, 0x63, 0x99, 0x82, 0x05, 0x21, 0xd1,
0x1e, 0x3c, 0xf4, 0x38, 0x54, 0x76, 0xce, 0xd1, 0xcb, 0x68, 0xb3, 0xcf, 0x1a, 0x4c, 0x9b, 0x92,
0x7c, 0x91, 0xfd, 0x2d, 0xfe, 0xb5, 0x42, 0xac, 0x53, 0x98, 0xb7, 0xe4, 0xbd, 0xdf, 0xf7, 0xde,
0x83, 0x87, 0xd6, 0xd0, 0x5b, 0x6c, 0x84, 0x76, 0x9d, 0x6c, 0x9d, 0x6b, 0x2d, 0x4a, 0x6d, 0x5d,
0xdc, 0x0e, 0xde, 0x35, 0xe8, 0x65, 0x87, 0xe4, 0x8d, 0x0e, 0x72, 0xf0, 0x8e, 0x9c, 0xdc, 0x9a,
0x40, 0x22, 0x3d, 0xf9, 0xe2, 0x0f, 0x25, 0x46, 0x6a, 0xf9, 0xc9, 0x60, 0xfa, 0x68, 0x02, 0xf1,
0x5b, 0x38, 0xc7, 0xdd, 0x60, 0x8d, 0x36, 0xb4, 0x69, 0xa2, 0x7e, 0x47, 0x0a, 0x97, 0x2c, 0x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