forked from google/cloudprober
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.pb.go
258 lines (227 loc) · 10.1 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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/google/cloudprober/probes/external/config.proto
/*
Package external is a generated protocol buffer package.
It is generated from these files:
github.com/google/cloudprober/probes/external/config.proto
It has these top-level messages:
ProbeConf
*/
package external
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
// External probes support two mode: ONCE and SERVER. In ONCE mode, external
// command is re-executed for each probe run, while in SERVER mode, command
// is run in server mode, re-executed only if not running already.
type ProbeConf_Mode int32
const (
ProbeConf_ONCE ProbeConf_Mode = 0
ProbeConf_SERVER ProbeConf_Mode = 1
)
var ProbeConf_Mode_name = map[int32]string{
0: "ONCE",
1: "SERVER",
}
var ProbeConf_Mode_value = map[string]int32{
"ONCE": 0,
"SERVER": 1,
}
func (x ProbeConf_Mode) Enum() *ProbeConf_Mode {
p := new(ProbeConf_Mode)
*p = x
return p
}
func (x ProbeConf_Mode) String() string {
return proto.EnumName(ProbeConf_Mode_name, int32(x))
}
func (x *ProbeConf_Mode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ProbeConf_Mode_value, data, "ProbeConf_Mode")
if err != nil {
return err
}
*x = ProbeConf_Mode(value)
return nil
}
func (ProbeConf_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
// MetricsKind specifies whether to treat output metrics as GAUGE or
// CUMULATIVE. If left unspecified, metrics from ONCE mode probes are treated
// as GAUGE and metrics from SERVER mode probes are treated as CUMULATIVE.
type ProbeConf_MetricsKind int32
const (
ProbeConf_UNDEFINED ProbeConf_MetricsKind = 0
ProbeConf_GAUGE ProbeConf_MetricsKind = 1
ProbeConf_CUMULATIVE ProbeConf_MetricsKind = 2
)
var ProbeConf_MetricsKind_name = map[int32]string{
0: "UNDEFINED",
1: "GAUGE",
2: "CUMULATIVE",
}
var ProbeConf_MetricsKind_value = map[string]int32{
"UNDEFINED": 0,
"GAUGE": 1,
"CUMULATIVE": 2,
}
func (x ProbeConf_MetricsKind) Enum() *ProbeConf_MetricsKind {
p := new(ProbeConf_MetricsKind)
*p = x
return p
}
func (x ProbeConf_MetricsKind) String() string {
return proto.EnumName(ProbeConf_MetricsKind_name, int32(x))
}
func (x *ProbeConf_MetricsKind) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ProbeConf_MetricsKind_value, data, "ProbeConf_MetricsKind")
if err != nil {
return err
}
*x = ProbeConf_MetricsKind(value)
return nil
}
func (ProbeConf_MetricsKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} }
type ProbeConf struct {
Mode *ProbeConf_Mode `protobuf:"varint,1,opt,name=mode,enum=cloudprober.probes.external.ProbeConf_Mode,def=0" json:"mode,omitempty"`
// Command. For ONCE probes, arguments are processed for the following field
// substitutions:
// @probe@ Name of the probe
// @target@ Hostname of the target
// @address@ IP address of the target
//
// For example, for target ig-us-central1-a, /tools/recreate_vm -vm @target@
// will get converted to: /tools/recreate_vm -vm ig-us-central1-a
Command *string `protobuf:"bytes,2,req,name=command" json:"command,omitempty"`
Options []*ProbeConf_Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
// Export output as metrics, where output is the output returned by the
// external probe process, over stdout for ONCE probes, and through ProbeReply
// for SERVER probes. Cloudprober expects variables to be in the following
// format in the output:
// var1 value1 (for example: total_errors 589)
OutputAsMetrics *bool `protobuf:"varint,4,opt,name=output_as_metrics,json=outputAsMetrics,def=1" json:"output_as_metrics,omitempty"`
OutputMetricsKind *ProbeConf_MetricsKind `protobuf:"varint,5,opt,name=output_metrics_kind,json=outputMetricsKind,enum=cloudprober.probes.external.ProbeConf_MetricsKind" json:"output_metrics_kind,omitempty"`
// Additional labels (comma-separated) to attach to the output metrics, e.g.
// "region=us-east1,zone=us-east1-d".
OutputMetricsLabels *string `protobuf:"bytes,6,opt,name=output_metrics_labels,json=outputMetricsLabels" json:"output_metrics_labels,omitempty"`
// IP version: For target resolution
IpVersion *int32 `protobuf:"varint,100,opt,name=ip_version,json=ipVersion,def=4" json:"ip_version,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ProbeConf) Reset() { *m = ProbeConf{} }
func (m *ProbeConf) String() string { return proto.CompactTextString(m) }
func (*ProbeConf) ProtoMessage() {}
func (*ProbeConf) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
const Default_ProbeConf_Mode ProbeConf_Mode = ProbeConf_ONCE
const Default_ProbeConf_OutputAsMetrics bool = true
const Default_ProbeConf_IpVersion int32 = 4
func (m *ProbeConf) GetMode() ProbeConf_Mode {
if m != nil && m.Mode != nil {
return *m.Mode
}
return Default_ProbeConf_Mode
}
func (m *ProbeConf) GetCommand() string {
if m != nil && m.Command != nil {
return *m.Command
}
return ""
}
func (m *ProbeConf) GetOptions() []*ProbeConf_Option {
if m != nil {
return m.Options
}
return nil
}
func (m *ProbeConf) GetOutputAsMetrics() bool {
if m != nil && m.OutputAsMetrics != nil {
return *m.OutputAsMetrics
}
return Default_ProbeConf_OutputAsMetrics
}
func (m *ProbeConf) GetOutputMetricsKind() ProbeConf_MetricsKind {
if m != nil && m.OutputMetricsKind != nil {
return *m.OutputMetricsKind
}
return ProbeConf_UNDEFINED
}
func (m *ProbeConf) GetOutputMetricsLabels() string {
if m != nil && m.OutputMetricsLabels != nil {
return *m.OutputMetricsLabels
}
return ""
}
func (m *ProbeConf) GetIpVersion() int32 {
if m != nil && m.IpVersion != nil {
return *m.IpVersion
}
return Default_ProbeConf_IpVersion
}
// Options for the SERVER mode probe requests. These options are passed on the
// external probe server as part of the ProbeRequest. Values are substituted
// similar to command arguments for the ONCE mode probes.
type ProbeConf_Option struct {
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ProbeConf_Option) Reset() { *m = ProbeConf_Option{} }
func (m *ProbeConf_Option) String() string { return proto.CompactTextString(m) }
func (*ProbeConf_Option) ProtoMessage() {}
func (*ProbeConf_Option) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
func (m *ProbeConf_Option) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *ProbeConf_Option) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
func init() {
proto.RegisterType((*ProbeConf)(nil), "cloudprober.probes.external.ProbeConf")
proto.RegisterType((*ProbeConf_Option)(nil), "cloudprober.probes.external.ProbeConf.Option")
proto.RegisterEnum("cloudprober.probes.external.ProbeConf_Mode", ProbeConf_Mode_name, ProbeConf_Mode_value)
proto.RegisterEnum("cloudprober.probes.external.ProbeConf_MetricsKind", ProbeConf_MetricsKind_name, ProbeConf_MetricsKind_value)
}
func init() {
proto.RegisterFile("github.com/google/cloudprober/probes/external/config.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 395 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xd1, 0x6b, 0xdb, 0x30,
0x10, 0xc6, 0xab, 0xd4, 0x49, 0xeb, 0x2b, 0xeb, 0x3c, 0x75, 0x03, 0xb1, 0xed, 0xc1, 0xe4, 0xc9,
0x30, 0x66, 0x0f, 0x33, 0x18, 0xe4, 0x2d, 0xa4, 0x5a, 0x28, 0x6b, 0xd2, 0xa1, 0x2d, 0x79, 0x0d,
0x8e, 0xad, 0x7a, 0x62, 0xb6, 0xce, 0xd8, 0x72, 0xd9, 0x1f, 0xb5, 0x3f, 0x72, 0x54, 0x4a, 0x46,
0xb6, 0x87, 0x92, 0x27, 0xe9, 0xbe, 0xfb, 0x7e, 0xdc, 0x1d, 0x1f, 0x4c, 0x4a, 0x65, 0x7e, 0xf4,
0xdb, 0x38, 0xc7, 0x3a, 0x29, 0x11, 0xcb, 0x4a, 0x26, 0x79, 0x85, 0x7d, 0xd1, 0xb4, 0xb8, 0x95,
0x6d, 0x62, 0x9f, 0x2e, 0x91, 0xbf, 0x8c, 0x6c, 0x75, 0x56, 0x25, 0x39, 0xea, 0x7b, 0x55, 0xc6,
0x4d, 0x8b, 0x06, 0xe9, 0x9b, 0x03, 0x67, 0xec, 0x9c, 0xf1, 0xde, 0x39, 0xfe, 0xed, 0x81, 0xff,
0xf5, 0x51, 0x9b, 0xa1, 0xbe, 0xa7, 0x1c, 0xbc, 0x1a, 0x0b, 0xc9, 0x48, 0x48, 0xa2, 0xcb, 0xf4,
0x5d, 0xfc, 0x04, 0x19, 0xff, 0xa5, 0xe2, 0x05,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