github.com/google/cloudprober@v0.11.3/probes/external/proto/config.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.26.0 4 // protoc v3.17.3 5 // source: github.com/google/cloudprober/probes/external/proto/config.proto 6 7 package proto 8 9 import ( 10 proto "github.com/google/cloudprober/metrics/payload/proto" 11 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 reflect "reflect" 14 sync "sync" 15 ) 16 17 const ( 18 // Verify that this generated code is sufficiently up-to-date. 19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 // Verify that runtime/protoimpl is sufficiently up-to-date. 21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 ) 23 24 // External probes support two mode: ONCE and SERVER. In ONCE mode, external 25 // command is re-executed for each probe run, while in SERVER mode, command 26 // is run in server mode, re-executed only if not running already. 27 type ProbeConf_Mode int32 28 29 const ( 30 ProbeConf_ONCE ProbeConf_Mode = 0 31 ProbeConf_SERVER ProbeConf_Mode = 1 32 ) 33 34 // Enum value maps for ProbeConf_Mode. 35 var ( 36 ProbeConf_Mode_name = map[int32]string{ 37 0: "ONCE", 38 1: "SERVER", 39 } 40 ProbeConf_Mode_value = map[string]int32{ 41 "ONCE": 0, 42 "SERVER": 1, 43 } 44 ) 45 46 func (x ProbeConf_Mode) Enum() *ProbeConf_Mode { 47 p := new(ProbeConf_Mode) 48 *p = x 49 return p 50 } 51 52 func (x ProbeConf_Mode) String() string { 53 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 54 } 55 56 func (ProbeConf_Mode) Descriptor() protoreflect.EnumDescriptor { 57 return file_github_com_google_cloudprober_probes_external_proto_config_proto_enumTypes[0].Descriptor() 58 } 59 60 func (ProbeConf_Mode) Type() protoreflect.EnumType { 61 return &file_github_com_google_cloudprober_probes_external_proto_config_proto_enumTypes[0] 62 } 63 64 func (x ProbeConf_Mode) Number() protoreflect.EnumNumber { 65 return protoreflect.EnumNumber(x) 66 } 67 68 // Deprecated: Do not use. 69 func (x *ProbeConf_Mode) UnmarshalJSON(b []byte) error { 70 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) 71 if err != nil { 72 return err 73 } 74 *x = ProbeConf_Mode(num) 75 return nil 76 } 77 78 // Deprecated: Use ProbeConf_Mode.Descriptor instead. 79 func (ProbeConf_Mode) EnumDescriptor() ([]byte, []int) { 80 return file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescGZIP(), []int{0, 0} 81 } 82 83 type ProbeConf struct { 84 state protoimpl.MessageState 85 sizeCache protoimpl.SizeCache 86 unknownFields protoimpl.UnknownFields 87 88 Mode *ProbeConf_Mode `protobuf:"varint,1,opt,name=mode,enum=cloudprober.probes.external.ProbeConf_Mode,def=0" json:"mode,omitempty"` 89 // Command. For ONCE probes, arguments are processed for the following field 90 // substitutions: 91 // @probe@ Name of the probe 92 // @target@ Hostname of the target 93 // @address@ IP address of the target 94 // 95 // For example, for target ig-us-central1-a, /tools/recreate_vm -vm @target@ 96 // will get converted to: /tools/recreate_vm -vm ig-us-central1-a 97 Command *string `protobuf:"bytes,2,req,name=command" json:"command,omitempty"` 98 Options []*ProbeConf_Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` 99 // Export output as metrics, where output is the output returned by the 100 // external probe process, over stdout for ONCE probes, and through ProbeReply 101 // for SERVER probes. Cloudprober expects variables to be in the following 102 // format in the output: 103 // var1 value1 (for example: total_errors 589) 104 OutputAsMetrics *bool `protobuf:"varint,4,opt,name=output_as_metrics,json=outputAsMetrics,def=1" json:"output_as_metrics,omitempty"` 105 OutputMetricsOptions *proto.OutputMetricsOptions `protobuf:"bytes,5,opt,name=output_metrics_options,json=outputMetricsOptions" json:"output_metrics_options,omitempty"` 106 } 107 108 // Default values for ProbeConf fields. 109 const ( 110 Default_ProbeConf_Mode = ProbeConf_ONCE 111 Default_ProbeConf_OutputAsMetrics = bool(true) 112 ) 113 114 func (x *ProbeConf) Reset() { 115 *x = ProbeConf{} 116 if protoimpl.UnsafeEnabled { 117 mi := &file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes[0] 118 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 119 ms.StoreMessageInfo(mi) 120 } 121 } 122 123 func (x *ProbeConf) String() string { 124 return protoimpl.X.MessageStringOf(x) 125 } 126 127 func (*ProbeConf) ProtoMessage() {} 128 129 func (x *ProbeConf) ProtoReflect() protoreflect.Message { 130 mi := &file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes[0] 131 if protoimpl.UnsafeEnabled && x != nil { 132 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 133 if ms.LoadMessageInfo() == nil { 134 ms.StoreMessageInfo(mi) 135 } 136 return ms 137 } 138 return mi.MessageOf(x) 139 } 140 141 // Deprecated: Use ProbeConf.ProtoReflect.Descriptor instead. 142 func (*ProbeConf) Descriptor() ([]byte, []int) { 143 return file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescGZIP(), []int{0} 144 } 145 146 func (x *ProbeConf) GetMode() ProbeConf_Mode { 147 if x != nil && x.Mode != nil { 148 return *x.Mode 149 } 150 return Default_ProbeConf_Mode 151 } 152 153 func (x *ProbeConf) GetCommand() string { 154 if x != nil && x.Command != nil { 155 return *x.Command 156 } 157 return "" 158 } 159 160 func (x *ProbeConf) GetOptions() []*ProbeConf_Option { 161 if x != nil { 162 return x.Options 163 } 164 return nil 165 } 166 167 func (x *ProbeConf) GetOutputAsMetrics() bool { 168 if x != nil && x.OutputAsMetrics != nil { 169 return *x.OutputAsMetrics 170 } 171 return Default_ProbeConf_OutputAsMetrics 172 } 173 174 func (x *ProbeConf) GetOutputMetricsOptions() *proto.OutputMetricsOptions { 175 if x != nil { 176 return x.OutputMetricsOptions 177 } 178 return nil 179 } 180 181 // Options for the SERVER mode probe requests. These options are passed on to 182 // the external probe server as part of the ProbeRequest. Values are 183 // substituted similar to command arguments for the ONCE mode probes. 184 type ProbeConf_Option struct { 185 state protoimpl.MessageState 186 sizeCache protoimpl.SizeCache 187 unknownFields protoimpl.UnknownFields 188 189 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 190 Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` 191 } 192 193 func (x *ProbeConf_Option) Reset() { 194 *x = ProbeConf_Option{} 195 if protoimpl.UnsafeEnabled { 196 mi := &file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes[1] 197 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 198 ms.StoreMessageInfo(mi) 199 } 200 } 201 202 func (x *ProbeConf_Option) String() string { 203 return protoimpl.X.MessageStringOf(x) 204 } 205 206 func (*ProbeConf_Option) ProtoMessage() {} 207 208 func (x *ProbeConf_Option) ProtoReflect() protoreflect.Message { 209 mi := &file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes[1] 210 if protoimpl.UnsafeEnabled && x != nil { 211 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 212 if ms.LoadMessageInfo() == nil { 213 ms.StoreMessageInfo(mi) 214 } 215 return ms 216 } 217 return mi.MessageOf(x) 218 } 219 220 // Deprecated: Use ProbeConf_Option.ProtoReflect.Descriptor instead. 221 func (*ProbeConf_Option) Descriptor() ([]byte, []int) { 222 return file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescGZIP(), []int{0, 0} 223 } 224 225 func (x *ProbeConf_Option) GetName() string { 226 if x != nil && x.Name != nil { 227 return *x.Name 228 } 229 return "" 230 } 231 232 func (x *ProbeConf_Option) GetValue() string { 233 if x != nil && x.Value != nil { 234 return *x.Value 235 } 236 return "" 237 } 238 239 var File_github_com_google_cloudprober_probes_external_proto_config_proto protoreflect.FileDescriptor 240 241 var file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDesc = []byte{ 242 0x0a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 243 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 244 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 245 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 246 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 247 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x1a, 248 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 249 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x6d, 250 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x70, 251 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 252 0x6f, 0x22, 0xa2, 0x03, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x12, 253 0x45, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 254 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x62, 255 0x65, 0x73, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x62, 256 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x04, 0x4f, 0x4e, 0x43, 0x45, 257 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 258 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 259 0x12, 0x47, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 260 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 261 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 262 0x50, 0x72, 0x6f, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 263 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x6f, 0x75, 0x74, 264 0x70, 0x75, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 265 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x70, 266 0x75, 0x74, 0x41, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x6f, 267 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6f, 0x70, 268 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6c, 269 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 270 0x73, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 271 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 272 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4f, 0x70, 0x74, 273 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x32, 0x0a, 0x06, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 274 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 275 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 276 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1c, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 277 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 278 0x52, 0x56, 0x45, 0x52, 0x10, 0x01, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 279 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 280 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x2f, 0x65, 281 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 282 } 283 284 var ( 285 file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescOnce sync.Once 286 file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescData = file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDesc 287 ) 288 289 func file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescGZIP() []byte { 290 file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescOnce.Do(func() { 291 file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescData) 292 }) 293 return file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDescData 294 } 295 296 var file_github_com_google_cloudprober_probes_external_proto_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 297 var file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 298 var file_github_com_google_cloudprober_probes_external_proto_config_proto_goTypes = []interface{}{ 299 (ProbeConf_Mode)(0), // 0: cloudprober.probes.external.ProbeConf.Mode 300 (*ProbeConf)(nil), // 1: cloudprober.probes.external.ProbeConf 301 (*ProbeConf_Option)(nil), // 2: cloudprober.probes.external.ProbeConf.Option 302 (*proto.OutputMetricsOptions)(nil), // 3: cloudprober.metrics.payload.OutputMetricsOptions 303 } 304 var file_github_com_google_cloudprober_probes_external_proto_config_proto_depIdxs = []int32{ 305 0, // 0: cloudprober.probes.external.ProbeConf.mode:type_name -> cloudprober.probes.external.ProbeConf.Mode 306 2, // 1: cloudprober.probes.external.ProbeConf.options:type_name -> cloudprober.probes.external.ProbeConf.Option 307 3, // 2: cloudprober.probes.external.ProbeConf.output_metrics_options:type_name -> cloudprober.metrics.payload.OutputMetricsOptions 308 3, // [3:3] is the sub-list for method output_type 309 3, // [3:3] is the sub-list for method input_type 310 3, // [3:3] is the sub-list for extension type_name 311 3, // [3:3] is the sub-list for extension extendee 312 0, // [0:3] is the sub-list for field type_name 313 } 314 315 func init() { file_github_com_google_cloudprober_probes_external_proto_config_proto_init() } 316 func file_github_com_google_cloudprober_probes_external_proto_config_proto_init() { 317 if File_github_com_google_cloudprober_probes_external_proto_config_proto != nil { 318 return 319 } 320 if !protoimpl.UnsafeEnabled { 321 file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 322 switch v := v.(*ProbeConf); i { 323 case 0: 324 return &v.state 325 case 1: 326 return &v.sizeCache 327 case 2: 328 return &v.unknownFields 329 default: 330 return nil 331 } 332 } 333 file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 334 switch v := v.(*ProbeConf_Option); i { 335 case 0: 336 return &v.state 337 case 1: 338 return &v.sizeCache 339 case 2: 340 return &v.unknownFields 341 default: 342 return nil 343 } 344 } 345 } 346 type x struct{} 347 out := protoimpl.TypeBuilder{ 348 File: protoimpl.DescBuilder{ 349 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 350 RawDescriptor: file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDesc, 351 NumEnums: 1, 352 NumMessages: 2, 353 NumExtensions: 0, 354 NumServices: 0, 355 }, 356 GoTypes: file_github_com_google_cloudprober_probes_external_proto_config_proto_goTypes, 357 DependencyIndexes: file_github_com_google_cloudprober_probes_external_proto_config_proto_depIdxs, 358 EnumInfos: file_github_com_google_cloudprober_probes_external_proto_config_proto_enumTypes, 359 MessageInfos: file_github_com_google_cloudprober_probes_external_proto_config_proto_msgTypes, 360 }.Build() 361 File_github_com_google_cloudprober_probes_external_proto_config_proto = out.File 362 file_github_com_google_cloudprober_probes_external_proto_config_proto_rawDesc = nil 363 file_github_com_google_cloudprober_probes_external_proto_config_proto_goTypes = nil 364 file_github_com_google_cloudprober_probes_external_proto_config_proto_depIdxs = nil 365 }