github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/stress/grpc_testing/metrics.pb.go (about) 1 // Copyright 2015-2016 gRPC authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Contains the definitions for a metrics service and the type of metrics 16 // exposed by the service. 17 // 18 // Currently, 'Gauge' (i.e a metric that represents the measured value of 19 // something at an instant of time) is the only metric type supported by the 20 // service. 21 22 // Code generated by protoc-gen-go. DO NOT EDIT. 23 // versions: 24 // protoc-gen-go v1.25.0 25 // protoc v3.14.0 26 // source: stress/grpc_testing/metrics.proto 27 28 package grpc_testing 29 30 import ( 31 proto "github.com/golang/protobuf/proto" 32 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 33 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 34 reflect "reflect" 35 sync "sync" 36 ) 37 38 const ( 39 // Verify that this generated code is sufficiently up-to-date. 40 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 41 // Verify that runtime/protoimpl is sufficiently up-to-date. 42 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 43 ) 44 45 // This is a compile-time assertion that a sufficiently up-to-date version 46 // of the legacy proto package is being used. 47 const _ = proto.ProtoPackageIsVersion4 48 49 // Response message containing the gauge name and value 50 type GaugeResponse struct { 51 state protoimpl.MessageState 52 sizeCache protoimpl.SizeCache 53 unknownFields protoimpl.UnknownFields 54 55 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 56 // Types that are assignable to Value: 57 // *GaugeResponse_LongValue 58 // *GaugeResponse_DoubleValue 59 // *GaugeResponse_StringValue 60 Value isGaugeResponse_Value `protobuf_oneof:"value"` 61 } 62 63 func (x *GaugeResponse) Reset() { 64 *x = GaugeResponse{} 65 if protoimpl.UnsafeEnabled { 66 mi := &file_stress_grpc_testing_metrics_proto_msgTypes[0] 67 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 68 ms.StoreMessageInfo(mi) 69 } 70 } 71 72 func (x *GaugeResponse) String() string { 73 return protoimpl.X.MessageStringOf(x) 74 } 75 76 func (*GaugeResponse) ProtoMessage() {} 77 78 func (x *GaugeResponse) ProtoReflect() protoreflect.Message { 79 mi := &file_stress_grpc_testing_metrics_proto_msgTypes[0] 80 if protoimpl.UnsafeEnabled && x != nil { 81 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 82 if ms.LoadMessageInfo() == nil { 83 ms.StoreMessageInfo(mi) 84 } 85 return ms 86 } 87 return mi.MessageOf(x) 88 } 89 90 // Deprecated: Use GaugeResponse.ProtoReflect.Descriptor instead. 91 func (*GaugeResponse) Descriptor() ([]byte, []int) { 92 return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{0} 93 } 94 95 func (x *GaugeResponse) GetName() string { 96 if x != nil { 97 return x.Name 98 } 99 return "" 100 } 101 102 func (m *GaugeResponse) GetValue() isGaugeResponse_Value { 103 if m != nil { 104 return m.Value 105 } 106 return nil 107 } 108 109 func (x *GaugeResponse) GetLongValue() int64 { 110 if x, ok := x.GetValue().(*GaugeResponse_LongValue); ok { 111 return x.LongValue 112 } 113 return 0 114 } 115 116 func (x *GaugeResponse) GetDoubleValue() float64 { 117 if x, ok := x.GetValue().(*GaugeResponse_DoubleValue); ok { 118 return x.DoubleValue 119 } 120 return 0 121 } 122 123 func (x *GaugeResponse) GetStringValue() string { 124 if x, ok := x.GetValue().(*GaugeResponse_StringValue); ok { 125 return x.StringValue 126 } 127 return "" 128 } 129 130 type isGaugeResponse_Value interface { 131 isGaugeResponse_Value() 132 } 133 134 type GaugeResponse_LongValue struct { 135 LongValue int64 `protobuf:"varint,2,opt,name=long_value,json=longValue,proto3,oneof"` 136 } 137 138 type GaugeResponse_DoubleValue struct { 139 DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` 140 } 141 142 type GaugeResponse_StringValue struct { 143 StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"` 144 } 145 146 func (*GaugeResponse_LongValue) isGaugeResponse_Value() {} 147 148 func (*GaugeResponse_DoubleValue) isGaugeResponse_Value() {} 149 150 func (*GaugeResponse_StringValue) isGaugeResponse_Value() {} 151 152 // Request message containing the gauge name 153 type GaugeRequest struct { 154 state protoimpl.MessageState 155 sizeCache protoimpl.SizeCache 156 unknownFields protoimpl.UnknownFields 157 158 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 159 } 160 161 func (x *GaugeRequest) Reset() { 162 *x = GaugeRequest{} 163 if protoimpl.UnsafeEnabled { 164 mi := &file_stress_grpc_testing_metrics_proto_msgTypes[1] 165 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 166 ms.StoreMessageInfo(mi) 167 } 168 } 169 170 func (x *GaugeRequest) String() string { 171 return protoimpl.X.MessageStringOf(x) 172 } 173 174 func (*GaugeRequest) ProtoMessage() {} 175 176 func (x *GaugeRequest) ProtoReflect() protoreflect.Message { 177 mi := &file_stress_grpc_testing_metrics_proto_msgTypes[1] 178 if protoimpl.UnsafeEnabled && x != nil { 179 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 180 if ms.LoadMessageInfo() == nil { 181 ms.StoreMessageInfo(mi) 182 } 183 return ms 184 } 185 return mi.MessageOf(x) 186 } 187 188 // Deprecated: Use GaugeRequest.ProtoReflect.Descriptor instead. 189 func (*GaugeRequest) Descriptor() ([]byte, []int) { 190 return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{1} 191 } 192 193 func (x *GaugeRequest) GetName() string { 194 if x != nil { 195 return x.Name 196 } 197 return "" 198 } 199 200 type EmptyMessage struct { 201 state protoimpl.MessageState 202 sizeCache protoimpl.SizeCache 203 unknownFields protoimpl.UnknownFields 204 } 205 206 func (x *EmptyMessage) Reset() { 207 *x = EmptyMessage{} 208 if protoimpl.UnsafeEnabled { 209 mi := &file_stress_grpc_testing_metrics_proto_msgTypes[2] 210 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 211 ms.StoreMessageInfo(mi) 212 } 213 } 214 215 func (x *EmptyMessage) String() string { 216 return protoimpl.X.MessageStringOf(x) 217 } 218 219 func (*EmptyMessage) ProtoMessage() {} 220 221 func (x *EmptyMessage) ProtoReflect() protoreflect.Message { 222 mi := &file_stress_grpc_testing_metrics_proto_msgTypes[2] 223 if protoimpl.UnsafeEnabled && x != nil { 224 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 225 if ms.LoadMessageInfo() == nil { 226 ms.StoreMessageInfo(mi) 227 } 228 return ms 229 } 230 return mi.MessageOf(x) 231 } 232 233 // Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. 234 func (*EmptyMessage) Descriptor() ([]byte, []int) { 235 return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{2} 236 } 237 238 var File_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor 239 240 var file_stress_grpc_testing_metrics_proto_rawDesc = []byte{ 241 0x0a, 0x21, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 242 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 243 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 244 0x67, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 245 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 246 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 247 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, 248 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 249 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 250 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 251 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 252 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 253 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x47, 254 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 255 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 256 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 257 0xa0, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 258 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x47, 0x61, 0x75, 0x67, 259 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 260 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 261 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 262 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x43, 0x0a, 263 0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x75, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 264 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 265 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 266 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 267 0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 268 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x72, 269 0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 270 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 271 } 272 273 var ( 274 file_stress_grpc_testing_metrics_proto_rawDescOnce sync.Once 275 file_stress_grpc_testing_metrics_proto_rawDescData = file_stress_grpc_testing_metrics_proto_rawDesc 276 ) 277 278 func file_stress_grpc_testing_metrics_proto_rawDescGZIP() []byte { 279 file_stress_grpc_testing_metrics_proto_rawDescOnce.Do(func() { 280 file_stress_grpc_testing_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_stress_grpc_testing_metrics_proto_rawDescData) 281 }) 282 return file_stress_grpc_testing_metrics_proto_rawDescData 283 } 284 285 var file_stress_grpc_testing_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 286 var file_stress_grpc_testing_metrics_proto_goTypes = []interface{}{ 287 (*GaugeResponse)(nil), // 0: grpc.testing.GaugeResponse 288 (*GaugeRequest)(nil), // 1: grpc.testing.GaugeRequest 289 (*EmptyMessage)(nil), // 2: grpc.testing.EmptyMessage 290 } 291 var file_stress_grpc_testing_metrics_proto_depIdxs = []int32{ 292 2, // 0: grpc.testing.MetricsService.GetAllGauges:input_type -> grpc.testing.EmptyMessage 293 1, // 1: grpc.testing.MetricsService.GetGauge:input_type -> grpc.testing.GaugeRequest 294 0, // 2: grpc.testing.MetricsService.GetAllGauges:output_type -> grpc.testing.GaugeResponse 295 0, // 3: grpc.testing.MetricsService.GetGauge:output_type -> grpc.testing.GaugeResponse 296 2, // [2:4] is the sub-list for method output_type 297 0, // [0:2] is the sub-list for method input_type 298 0, // [0:0] is the sub-list for extension type_name 299 0, // [0:0] is the sub-list for extension extendee 300 0, // [0:0] is the sub-list for field type_name 301 } 302 303 func init() { file_stress_grpc_testing_metrics_proto_init() } 304 func file_stress_grpc_testing_metrics_proto_init() { 305 if File_stress_grpc_testing_metrics_proto != nil { 306 return 307 } 308 if !protoimpl.UnsafeEnabled { 309 file_stress_grpc_testing_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 310 switch v := v.(*GaugeResponse); i { 311 case 0: 312 return &v.state 313 case 1: 314 return &v.sizeCache 315 case 2: 316 return &v.unknownFields 317 default: 318 return nil 319 } 320 } 321 file_stress_grpc_testing_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 322 switch v := v.(*GaugeRequest); 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_stress_grpc_testing_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 334 switch v := v.(*EmptyMessage); 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 file_stress_grpc_testing_metrics_proto_msgTypes[0].OneofWrappers = []interface{}{ 347 (*GaugeResponse_LongValue)(nil), 348 (*GaugeResponse_DoubleValue)(nil), 349 (*GaugeResponse_StringValue)(nil), 350 } 351 type x struct{} 352 out := protoimpl.TypeBuilder{ 353 File: protoimpl.DescBuilder{ 354 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 355 RawDescriptor: file_stress_grpc_testing_metrics_proto_rawDesc, 356 NumEnums: 0, 357 NumMessages: 3, 358 NumExtensions: 0, 359 NumServices: 1, 360 }, 361 GoTypes: file_stress_grpc_testing_metrics_proto_goTypes, 362 DependencyIndexes: file_stress_grpc_testing_metrics_proto_depIdxs, 363 MessageInfos: file_stress_grpc_testing_metrics_proto_msgTypes, 364 }.Build() 365 File_stress_grpc_testing_metrics_proto = out.File 366 file_stress_grpc_testing_metrics_proto_rawDesc = nil 367 file_stress_grpc_testing_metrics_proto_goTypes = nil 368 file_stress_grpc_testing_metrics_proto_depIdxs = nil 369 }