google.golang.org/grpc@v1.74.2/interop/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.36.6 25 // protoc v5.27.1 26 // source: interop/stress/grpc_testing/metrics.proto 27 28 package grpc_testing 29 30 import ( 31 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 32 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 33 reflect "reflect" 34 sync "sync" 35 unsafe "unsafe" 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 // Response message containing the gauge name and value 46 type GaugeResponse struct { 47 state protoimpl.MessageState `protogen:"open.v1"` 48 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 49 // Types that are valid to be assigned to Value: 50 // 51 // *GaugeResponse_LongValue 52 // *GaugeResponse_DoubleValue 53 // *GaugeResponse_StringValue 54 Value isGaugeResponse_Value `protobuf_oneof:"value"` 55 unknownFields protoimpl.UnknownFields 56 sizeCache protoimpl.SizeCache 57 } 58 59 func (x *GaugeResponse) Reset() { 60 *x = GaugeResponse{} 61 mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[0] 62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 63 ms.StoreMessageInfo(mi) 64 } 65 66 func (x *GaugeResponse) String() string { 67 return protoimpl.X.MessageStringOf(x) 68 } 69 70 func (*GaugeResponse) ProtoMessage() {} 71 72 func (x *GaugeResponse) ProtoReflect() protoreflect.Message { 73 mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[0] 74 if x != nil { 75 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 76 if ms.LoadMessageInfo() == nil { 77 ms.StoreMessageInfo(mi) 78 } 79 return ms 80 } 81 return mi.MessageOf(x) 82 } 83 84 // Deprecated: Use GaugeResponse.ProtoReflect.Descriptor instead. 85 func (*GaugeResponse) Descriptor() ([]byte, []int) { 86 return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{0} 87 } 88 89 func (x *GaugeResponse) GetName() string { 90 if x != nil { 91 return x.Name 92 } 93 return "" 94 } 95 96 func (x *GaugeResponse) GetValue() isGaugeResponse_Value { 97 if x != nil { 98 return x.Value 99 } 100 return nil 101 } 102 103 func (x *GaugeResponse) GetLongValue() int64 { 104 if x != nil { 105 if x, ok := x.Value.(*GaugeResponse_LongValue); ok { 106 return x.LongValue 107 } 108 } 109 return 0 110 } 111 112 func (x *GaugeResponse) GetDoubleValue() float64 { 113 if x != nil { 114 if x, ok := x.Value.(*GaugeResponse_DoubleValue); ok { 115 return x.DoubleValue 116 } 117 } 118 return 0 119 } 120 121 func (x *GaugeResponse) GetStringValue() string { 122 if x != nil { 123 if x, ok := x.Value.(*GaugeResponse_StringValue); ok { 124 return x.StringValue 125 } 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 `protogen:"open.v1"` 155 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 156 unknownFields protoimpl.UnknownFields 157 sizeCache protoimpl.SizeCache 158 } 159 160 func (x *GaugeRequest) Reset() { 161 *x = GaugeRequest{} 162 mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[1] 163 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 164 ms.StoreMessageInfo(mi) 165 } 166 167 func (x *GaugeRequest) String() string { 168 return protoimpl.X.MessageStringOf(x) 169 } 170 171 func (*GaugeRequest) ProtoMessage() {} 172 173 func (x *GaugeRequest) ProtoReflect() protoreflect.Message { 174 mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[1] 175 if x != nil { 176 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 177 if ms.LoadMessageInfo() == nil { 178 ms.StoreMessageInfo(mi) 179 } 180 return ms 181 } 182 return mi.MessageOf(x) 183 } 184 185 // Deprecated: Use GaugeRequest.ProtoReflect.Descriptor instead. 186 func (*GaugeRequest) Descriptor() ([]byte, []int) { 187 return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{1} 188 } 189 190 func (x *GaugeRequest) GetName() string { 191 if x != nil { 192 return x.Name 193 } 194 return "" 195 } 196 197 type EmptyMessage struct { 198 state protoimpl.MessageState `protogen:"open.v1"` 199 unknownFields protoimpl.UnknownFields 200 sizeCache protoimpl.SizeCache 201 } 202 203 func (x *EmptyMessage) Reset() { 204 *x = EmptyMessage{} 205 mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[2] 206 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 207 ms.StoreMessageInfo(mi) 208 } 209 210 func (x *EmptyMessage) String() string { 211 return protoimpl.X.MessageStringOf(x) 212 } 213 214 func (*EmptyMessage) ProtoMessage() {} 215 216 func (x *EmptyMessage) ProtoReflect() protoreflect.Message { 217 mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[2] 218 if x != nil { 219 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 220 if ms.LoadMessageInfo() == nil { 221 ms.StoreMessageInfo(mi) 222 } 223 return ms 224 } 225 return mi.MessageOf(x) 226 } 227 228 // Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead. 229 func (*EmptyMessage) Descriptor() ([]byte, []int) { 230 return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{2} 231 } 232 233 var File_interop_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor 234 235 const file_interop_stress_grpc_testing_metrics_proto_rawDesc = "" + 236 "\n" + 237 ")interop/stress/grpc_testing/metrics.proto\x12\fgrpc.testing\"\x97\x01\n" + 238 "\rGaugeResponse\x12\x12\n" + 239 "\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n" + 240 "\n" + 241 "long_value\x18\x02 \x01(\x03H\x00R\tlongValue\x12#\n" + 242 "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12#\n" + 243 "\fstring_value\x18\x04 \x01(\tH\x00R\vstringValueB\a\n" + 244 "\x05value\"\"\n" + 245 "\fGaugeRequest\x12\x12\n" + 246 "\x04name\x18\x01 \x01(\tR\x04name\"\x0e\n" + 247 "\fEmptyMessage2\xa0\x01\n" + 248 "\x0eMetricsService\x12I\n" + 249 "\fGetAllGauges\x12\x1a.grpc.testing.EmptyMessage\x1a\x1b.grpc.testing.GaugeResponse0\x01\x12C\n" + 250 "\bGetGauge\x12\x1a.grpc.testing.GaugeRequest\x1a\x1b.grpc.testing.GaugeResponseB4Z2google.golang.org/grpc/interop/stress/grpc_testingb\x06proto3" 251 252 var ( 253 file_interop_stress_grpc_testing_metrics_proto_rawDescOnce sync.Once 254 file_interop_stress_grpc_testing_metrics_proto_rawDescData []byte 255 ) 256 257 func file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP() []byte { 258 file_interop_stress_grpc_testing_metrics_proto_rawDescOnce.Do(func() { 259 file_interop_stress_grpc_testing_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_interop_stress_grpc_testing_metrics_proto_rawDesc), len(file_interop_stress_grpc_testing_metrics_proto_rawDesc))) 260 }) 261 return file_interop_stress_grpc_testing_metrics_proto_rawDescData 262 } 263 264 var file_interop_stress_grpc_testing_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 265 var file_interop_stress_grpc_testing_metrics_proto_goTypes = []any{ 266 (*GaugeResponse)(nil), // 0: grpc.testing.GaugeResponse 267 (*GaugeRequest)(nil), // 1: grpc.testing.GaugeRequest 268 (*EmptyMessage)(nil), // 2: grpc.testing.EmptyMessage 269 } 270 var file_interop_stress_grpc_testing_metrics_proto_depIdxs = []int32{ 271 2, // 0: grpc.testing.MetricsService.GetAllGauges:input_type -> grpc.testing.EmptyMessage 272 1, // 1: grpc.testing.MetricsService.GetGauge:input_type -> grpc.testing.GaugeRequest 273 0, // 2: grpc.testing.MetricsService.GetAllGauges:output_type -> grpc.testing.GaugeResponse 274 0, // 3: grpc.testing.MetricsService.GetGauge:output_type -> grpc.testing.GaugeResponse 275 2, // [2:4] is the sub-list for method output_type 276 0, // [0:2] is the sub-list for method input_type 277 0, // [0:0] is the sub-list for extension type_name 278 0, // [0:0] is the sub-list for extension extendee 279 0, // [0:0] is the sub-list for field type_name 280 } 281 282 func init() { file_interop_stress_grpc_testing_metrics_proto_init() } 283 func file_interop_stress_grpc_testing_metrics_proto_init() { 284 if File_interop_stress_grpc_testing_metrics_proto != nil { 285 return 286 } 287 file_interop_stress_grpc_testing_metrics_proto_msgTypes[0].OneofWrappers = []any{ 288 (*GaugeResponse_LongValue)(nil), 289 (*GaugeResponse_DoubleValue)(nil), 290 (*GaugeResponse_StringValue)(nil), 291 } 292 type x struct{} 293 out := protoimpl.TypeBuilder{ 294 File: protoimpl.DescBuilder{ 295 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 296 RawDescriptor: unsafe.Slice(unsafe.StringData(file_interop_stress_grpc_testing_metrics_proto_rawDesc), len(file_interop_stress_grpc_testing_metrics_proto_rawDesc)), 297 NumEnums: 0, 298 NumMessages: 3, 299 NumExtensions: 0, 300 NumServices: 1, 301 }, 302 GoTypes: file_interop_stress_grpc_testing_metrics_proto_goTypes, 303 DependencyIndexes: file_interop_stress_grpc_testing_metrics_proto_depIdxs, 304 MessageInfos: file_interop_stress_grpc_testing_metrics_proto_msgTypes, 305 }.Build() 306 File_interop_stress_grpc_testing_metrics_proto = out.File 307 file_interop_stress_grpc_testing_metrics_proto_goTypes = nil 308 file_interop_stress_grpc_testing_metrics_proto_depIdxs = nil 309 }