forked from google/cloudprober
/
config.pb.go
342 lines (300 loc) · 13.2 KB
/
config.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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/google/cloudprober/targets/gce/config.proto
/*
Package gce is a generated protocol buffer package.
It is generated from these files:
github.com/google/cloudprober/targets/gce/config.proto
It has these top-level messages:
TargetsConf
Instances
ForwardingRules
GlobalOptions
*/
package gce
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
type Instances_NetworkInterface_IPType int32
const (
// Private IP address.
Instances_NetworkInterface_PRIVATE Instances_NetworkInterface_IPType = 0
// IP address of the first access config.
Instances_NetworkInterface_PUBLIC Instances_NetworkInterface_IPType = 1
// First IP address from the first Alias IP range. For example, for
// alias IP range "192.168.12.0/24", 192.168.12.0 will be returned.
Instances_NetworkInterface_ALIAS Instances_NetworkInterface_IPType = 2
)
var Instances_NetworkInterface_IPType_name = map[int32]string{
0: "PRIVATE",
1: "PUBLIC",
2: "ALIAS",
}
var Instances_NetworkInterface_IPType_value = map[string]int32{
"PRIVATE": 0,
"PUBLIC": 1,
"ALIAS": 2,
}
func (x Instances_NetworkInterface_IPType) Enum() *Instances_NetworkInterface_IPType {
p := new(Instances_NetworkInterface_IPType)
*p = x
return p
}
func (x Instances_NetworkInterface_IPType) String() string {
return proto.EnumName(Instances_NetworkInterface_IPType_name, int32(x))
}
func (x *Instances_NetworkInterface_IPType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Instances_NetworkInterface_IPType_value, data, "Instances_NetworkInterface_IPType")
if err != nil {
return err
}
*x = Instances_NetworkInterface_IPType(value)
return nil
}
func (Instances_NetworkInterface_IPType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{1, 0, 0}
}
// TargetsConf represents GCE targets, e.g. instances, forwarding rules etc.
type TargetsConf struct {
// If running on GCE, this defaults to the local project.
Project *string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
// Types that are valid to be assigned to Type:
// *TargetsConf_Instances
// *TargetsConf_ForwardingRules
Type isTargetsConf_Type `protobuf_oneof:"type"`
XXX_unrecognized []byte `json:"-"`
}
func (m *TargetsConf) Reset() { *m = TargetsConf{} }
func (m *TargetsConf) String() string { return proto.CompactTextString(m) }
func (*TargetsConf) ProtoMessage() {}
func (*TargetsConf) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type isTargetsConf_Type interface {
isTargetsConf_Type()
}
type TargetsConf_Instances struct {
Instances *Instances `protobuf:"bytes,2,opt,name=instances,oneof"`
}
type TargetsConf_ForwardingRules struct {
ForwardingRules *ForwardingRules `protobuf:"bytes,3,opt,name=forwarding_rules,json=forwardingRules,oneof"`
}
func (*TargetsConf_Instances) isTargetsConf_Type() {}
func (*TargetsConf_ForwardingRules) isTargetsConf_Type() {}
func (m *TargetsConf) GetType() isTargetsConf_Type {
if m != nil {
return m.Type
}
return nil
}
func (m *TargetsConf) GetProject() string {
if m != nil && m.Project != nil {
return *m.Project
}
return ""
}
func (m *TargetsConf) GetInstances() *Instances {
if x, ok := m.GetType().(*TargetsConf_Instances); ok {
return x.Instances
}
return nil
}
func (m *TargetsConf) GetForwardingRules() *ForwardingRules {
if x, ok := m.GetType().(*TargetsConf_ForwardingRules); ok {
return x.ForwardingRules
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TargetsConf) 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 _TargetsConf_OneofMarshaler, _TargetsConf_OneofUnmarshaler, _TargetsConf_OneofSizer, []interface{}{
(*TargetsConf_Instances)(nil),
(*TargetsConf_ForwardingRules)(nil),
}
}
func _TargetsConf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TargetsConf)
// type
switch x := m.Type.(type) {
case *TargetsConf_Instances:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Instances); err != nil {
return err
}
case *TargetsConf_ForwardingRules:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ForwardingRules); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TargetsConf.Type has unexpected type %T", x)
}
return nil
}
func _TargetsConf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TargetsConf)
switch tag {
case 2: // type.instances
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Instances)
err := b.DecodeMessage(msg)
m.Type = &TargetsConf_Instances{msg}
return true, err
case 3: // type.forwarding_rules
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ForwardingRules)
err := b.DecodeMessage(msg)
m.Type = &TargetsConf_ForwardingRules{msg}
return true, err
default:
return false, nil
}
}
func _TargetsConf_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TargetsConf)
// type
switch x := m.Type.(type) {
case *TargetsConf_Instances:
s := proto.Size(x.Instances)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TargetsConf_ForwardingRules:
s := proto.Size(x.ForwardingRules)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Represents GCE instances
type Instances struct {
// Use DNS to resolve target names (instances). If set to false (default),
// IP addresses specified in the compute.Instance resource is used. If set
// to true all the other resolving options are ignored.
UseDnsToResolve *bool `protobuf:"varint,1,opt,name=use_dns_to_resolve,json=useDnsToResolve,def=0" json:"use_dns_to_resolve,omitempty"`
NetworkInterface *Instances_NetworkInterface `protobuf:"bytes,2,opt,name=network_interface,json=networkInterface" json:"network_interface,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Instances) Reset() { *m = Instances{} }
func (m *Instances) String() string { return proto.CompactTextString(m) }
func (*Instances) ProtoMessage() {}
func (*Instances) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
const Default_Instances_UseDnsToResolve bool = false
func (m *Instances) GetUseDnsToResolve() bool {
if m != nil && m.UseDnsToResolve != nil {
return *m.UseDnsToResolve
}
return Default_Instances_UseDnsToResolve
}
func (m *Instances) GetNetworkInterface() *Instances_NetworkInterface {
if m != nil {
return m.NetworkInterface
}
return nil
}
// Get the IP address from Network Interface
type Instances_NetworkInterface struct {
Index *int32 `protobuf:"varint,1,opt,name=index,def=0" json:"index,omitempty"`
IpType *Instances_NetworkInterface_IPType `protobuf:"varint,2,opt,name=ip_type,json=ipType,enum=cloudprober.targets.gce.Instances_NetworkInterface_IPType,def=0" json:"ip_type,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Instances_NetworkInterface) Reset() { *m = Instances_NetworkInterface{} }
func (m *Instances_NetworkInterface) String() string { return proto.CompactTextString(m) }
func (*Instances_NetworkInterface) ProtoMessage() {}
func (*Instances_NetworkInterface) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
const Default_Instances_NetworkInterface_Index int32 = 0
const Default_Instances_NetworkInterface_IpType Instances_NetworkInterface_IPType = Instances_NetworkInterface_PRIVATE
func (m *Instances_NetworkInterface) GetIndex() int32 {
if m != nil && m.Index != nil {
return *m.Index
}
return Default_Instances_NetworkInterface_Index
}
func (m *Instances_NetworkInterface) GetIpType() Instances_NetworkInterface_IPType {
if m != nil && m.IpType != nil {
return *m.IpType
}
return Default_Instances_NetworkInterface_IpType
}
// Represents GCE forwarding rules
type ForwardingRules struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *ForwardingRules) Reset() { *m = ForwardingRules{} }
func (m *ForwardingRules) String() string { return proto.CompactTextString(m) }
func (*ForwardingRules) ProtoMessage() {}
func (*ForwardingRules) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
// Global GCE targets options. These options are independent of the per-probe
// targets which are defined by the "GCETargets" type above.
type GlobalOptions struct {
// How often targets should be evaluated/expanded
ReEvalSec *int32 `protobuf:"varint,1,opt,name=re_eval_sec,json=reEvalSec,def=900" json:"re_eval_sec,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *GlobalOptions) Reset() { *m = GlobalOptions{} }
func (m *GlobalOptions) String() string { return proto.CompactTextString(m) }
func (*GlobalOptions) ProtoMessage() {}
func (*GlobalOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
const Default_GlobalOptions_ReEvalSec int32 = 900
func (m *GlobalOptions) GetReEvalSec() int32 {
if m != nil && m.ReEvalSec != nil {
return *m.ReEvalSec
}
return Default_GlobalOptions_ReEvalSec
}
func init() {
proto.RegisterType((*TargetsConf)(nil), "cloudprober.targets.gce.TargetsConf")
proto.RegisterType((*Instances)(nil), "cloudprober.targets.gce.Instances")
proto.RegisterType((*Instances_NetworkInterface)(nil), "cloudprober.targets.gce.Instances.NetworkInterface")
proto.RegisterType((*ForwardingRules)(nil), "cloudprober.targets.gce.ForwardingRules")
proto.RegisterType((*GlobalOptions)(nil), "cloudprober.targets.gce.GlobalOptions")
proto.RegisterEnum("cloudprober.targets.gce.Instances_NetworkInterface_IPType", Instances_NetworkInterface_IPType_name, Instances_NetworkInterface_IPType_value)
}
func init() {
proto.RegisterFile("github.com/google/cloudprober/targets/gce/config.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 417 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xdd, 0x6e, 0x12, 0x41,
0x14, 0x66, 0xa9, 0x80, 0x7b, 0x88, 0xb2, 0x9d, 0x9b, 0x12, 0xaf, 0x9a, 0xf5, 0x86, 0x0b, 0xb3,
0x4b, 0xd0, 0x98, 0xc8, 0x1d, 0xd4, 0x6a, 0x37, 0x69, 0x94, 0x4c, 0xa9, 0x57, 0x26, 0xeb, 0x32,
0x9c, 0x5d, 0x47, 0xc7, 0x39, 0x9b, 0x99, 0x59, 0x6a, 0x9f, 0xcc, 0x77, 0xf0, 0x15, 0x7c, 0x19,
0x03, 0x0b, 0x55, 0x49, 0x88, 0x49, 0x2f, 0xcf, 0xf7, 0x37, 0xdf, 0x97, 0x81, 0x97, 0x85, 0x74,
0x9f, 0xab, 0x45, 0x24, 0xe8, 0x5b, 0x5c, 0x10, 0x15, 0x0a, 0x63, 0xa1, 0xa8, 0x5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