google.golang.org/grpc@v1.74.2/interop/grpc_testing/core/stats.pb.go (about) 1 // Copyright 2017 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 // Code generated by protoc-gen-go. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.36.6 18 // protoc v5.27.1 19 // source: grpc/core/stats.proto 20 21 package core 22 23 import ( 24 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 25 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 26 reflect "reflect" 27 sync "sync" 28 unsafe "unsafe" 29 ) 30 31 const ( 32 // Verify that this generated code is sufficiently up-to-date. 33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 34 // Verify that runtime/protoimpl is sufficiently up-to-date. 35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 36 ) 37 38 type Bucket struct { 39 state protoimpl.MessageState `protogen:"open.v1"` 40 Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` 41 Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` 42 unknownFields protoimpl.UnknownFields 43 sizeCache protoimpl.SizeCache 44 } 45 46 func (x *Bucket) Reset() { 47 *x = Bucket{} 48 mi := &file_grpc_core_stats_proto_msgTypes[0] 49 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 50 ms.StoreMessageInfo(mi) 51 } 52 53 func (x *Bucket) String() string { 54 return protoimpl.X.MessageStringOf(x) 55 } 56 57 func (*Bucket) ProtoMessage() {} 58 59 func (x *Bucket) ProtoReflect() protoreflect.Message { 60 mi := &file_grpc_core_stats_proto_msgTypes[0] 61 if x != nil { 62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 63 if ms.LoadMessageInfo() == nil { 64 ms.StoreMessageInfo(mi) 65 } 66 return ms 67 } 68 return mi.MessageOf(x) 69 } 70 71 // Deprecated: Use Bucket.ProtoReflect.Descriptor instead. 72 func (*Bucket) Descriptor() ([]byte, []int) { 73 return file_grpc_core_stats_proto_rawDescGZIP(), []int{0} 74 } 75 76 func (x *Bucket) GetStart() float64 { 77 if x != nil { 78 return x.Start 79 } 80 return 0 81 } 82 83 func (x *Bucket) GetCount() uint64 { 84 if x != nil { 85 return x.Count 86 } 87 return 0 88 } 89 90 type Histogram struct { 91 state protoimpl.MessageState `protogen:"open.v1"` 92 Buckets []*Bucket `protobuf:"bytes,1,rep,name=buckets,proto3" json:"buckets,omitempty"` 93 unknownFields protoimpl.UnknownFields 94 sizeCache protoimpl.SizeCache 95 } 96 97 func (x *Histogram) Reset() { 98 *x = Histogram{} 99 mi := &file_grpc_core_stats_proto_msgTypes[1] 100 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 101 ms.StoreMessageInfo(mi) 102 } 103 104 func (x *Histogram) String() string { 105 return protoimpl.X.MessageStringOf(x) 106 } 107 108 func (*Histogram) ProtoMessage() {} 109 110 func (x *Histogram) ProtoReflect() protoreflect.Message { 111 mi := &file_grpc_core_stats_proto_msgTypes[1] 112 if x != nil { 113 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 114 if ms.LoadMessageInfo() == nil { 115 ms.StoreMessageInfo(mi) 116 } 117 return ms 118 } 119 return mi.MessageOf(x) 120 } 121 122 // Deprecated: Use Histogram.ProtoReflect.Descriptor instead. 123 func (*Histogram) Descriptor() ([]byte, []int) { 124 return file_grpc_core_stats_proto_rawDescGZIP(), []int{1} 125 } 126 127 func (x *Histogram) GetBuckets() []*Bucket { 128 if x != nil { 129 return x.Buckets 130 } 131 return nil 132 } 133 134 type Metric struct { 135 state protoimpl.MessageState `protogen:"open.v1"` 136 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 137 // Types that are valid to be assigned to Value: 138 // 139 // *Metric_Count 140 // *Metric_Histogram 141 Value isMetric_Value `protobuf_oneof:"value"` 142 unknownFields protoimpl.UnknownFields 143 sizeCache protoimpl.SizeCache 144 } 145 146 func (x *Metric) Reset() { 147 *x = Metric{} 148 mi := &file_grpc_core_stats_proto_msgTypes[2] 149 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 150 ms.StoreMessageInfo(mi) 151 } 152 153 func (x *Metric) String() string { 154 return protoimpl.X.MessageStringOf(x) 155 } 156 157 func (*Metric) ProtoMessage() {} 158 159 func (x *Metric) ProtoReflect() protoreflect.Message { 160 mi := &file_grpc_core_stats_proto_msgTypes[2] 161 if x != nil { 162 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 163 if ms.LoadMessageInfo() == nil { 164 ms.StoreMessageInfo(mi) 165 } 166 return ms 167 } 168 return mi.MessageOf(x) 169 } 170 171 // Deprecated: Use Metric.ProtoReflect.Descriptor instead. 172 func (*Metric) Descriptor() ([]byte, []int) { 173 return file_grpc_core_stats_proto_rawDescGZIP(), []int{2} 174 } 175 176 func (x *Metric) GetName() string { 177 if x != nil { 178 return x.Name 179 } 180 return "" 181 } 182 183 func (x *Metric) GetValue() isMetric_Value { 184 if x != nil { 185 return x.Value 186 } 187 return nil 188 } 189 190 func (x *Metric) GetCount() uint64 { 191 if x != nil { 192 if x, ok := x.Value.(*Metric_Count); ok { 193 return x.Count 194 } 195 } 196 return 0 197 } 198 199 func (x *Metric) GetHistogram() *Histogram { 200 if x != nil { 201 if x, ok := x.Value.(*Metric_Histogram); ok { 202 return x.Histogram 203 } 204 } 205 return nil 206 } 207 208 type isMetric_Value interface { 209 isMetric_Value() 210 } 211 212 type Metric_Count struct { 213 Count uint64 `protobuf:"varint,10,opt,name=count,proto3,oneof"` 214 } 215 216 type Metric_Histogram struct { 217 Histogram *Histogram `protobuf:"bytes,11,opt,name=histogram,proto3,oneof"` 218 } 219 220 func (*Metric_Count) isMetric_Value() {} 221 222 func (*Metric_Histogram) isMetric_Value() {} 223 224 type Stats struct { 225 state protoimpl.MessageState `protogen:"open.v1"` 226 Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` 227 unknownFields protoimpl.UnknownFields 228 sizeCache protoimpl.SizeCache 229 } 230 231 func (x *Stats) Reset() { 232 *x = Stats{} 233 mi := &file_grpc_core_stats_proto_msgTypes[3] 234 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 235 ms.StoreMessageInfo(mi) 236 } 237 238 func (x *Stats) String() string { 239 return protoimpl.X.MessageStringOf(x) 240 } 241 242 func (*Stats) ProtoMessage() {} 243 244 func (x *Stats) ProtoReflect() protoreflect.Message { 245 mi := &file_grpc_core_stats_proto_msgTypes[3] 246 if x != nil { 247 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 248 if ms.LoadMessageInfo() == nil { 249 ms.StoreMessageInfo(mi) 250 } 251 return ms 252 } 253 return mi.MessageOf(x) 254 } 255 256 // Deprecated: Use Stats.ProtoReflect.Descriptor instead. 257 func (*Stats) Descriptor() ([]byte, []int) { 258 return file_grpc_core_stats_proto_rawDescGZIP(), []int{3} 259 } 260 261 func (x *Stats) GetMetrics() []*Metric { 262 if x != nil { 263 return x.Metrics 264 } 265 return nil 266 } 267 268 var File_grpc_core_stats_proto protoreflect.FileDescriptor 269 270 const file_grpc_core_stats_proto_rawDesc = "" + 271 "\n" + 272 "\x15grpc/core/stats.proto\x12\tgrpc.core\"4\n" + 273 "\x06Bucket\x12\x14\n" + 274 "\x05start\x18\x01 \x01(\x01R\x05start\x12\x14\n" + 275 "\x05count\x18\x02 \x01(\x04R\x05count\"8\n" + 276 "\tHistogram\x12+\n" + 277 "\abuckets\x18\x01 \x03(\v2\x11.grpc.core.BucketR\abuckets\"s\n" + 278 "\x06Metric\x12\x12\n" + 279 "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + 280 "\x05count\x18\n" + 281 " \x01(\x04H\x00R\x05count\x124\n" + 282 "\thistogram\x18\v \x01(\v2\x14.grpc.core.HistogramH\x00R\thistogramB\a\n" + 283 "\x05value\"4\n" + 284 "\x05Stats\x12+\n" + 285 "\ametrics\x18\x01 \x03(\v2\x11.grpc.core.MetricR\ametricsb\x06proto3" 286 287 var ( 288 file_grpc_core_stats_proto_rawDescOnce sync.Once 289 file_grpc_core_stats_proto_rawDescData []byte 290 ) 291 292 func file_grpc_core_stats_proto_rawDescGZIP() []byte { 293 file_grpc_core_stats_proto_rawDescOnce.Do(func() { 294 file_grpc_core_stats_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_core_stats_proto_rawDesc), len(file_grpc_core_stats_proto_rawDesc))) 295 }) 296 return file_grpc_core_stats_proto_rawDescData 297 } 298 299 var file_grpc_core_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 300 var file_grpc_core_stats_proto_goTypes = []any{ 301 (*Bucket)(nil), // 0: grpc.core.Bucket 302 (*Histogram)(nil), // 1: grpc.core.Histogram 303 (*Metric)(nil), // 2: grpc.core.Metric 304 (*Stats)(nil), // 3: grpc.core.Stats 305 } 306 var file_grpc_core_stats_proto_depIdxs = []int32{ 307 0, // 0: grpc.core.Histogram.buckets:type_name -> grpc.core.Bucket 308 1, // 1: grpc.core.Metric.histogram:type_name -> grpc.core.Histogram 309 2, // 2: grpc.core.Stats.metrics:type_name -> grpc.core.Metric 310 3, // [3:3] is the sub-list for method output_type 311 3, // [3:3] is the sub-list for method input_type 312 3, // [3:3] is the sub-list for extension type_name 313 3, // [3:3] is the sub-list for extension extendee 314 0, // [0:3] is the sub-list for field type_name 315 } 316 317 func init() { file_grpc_core_stats_proto_init() } 318 func file_grpc_core_stats_proto_init() { 319 if File_grpc_core_stats_proto != nil { 320 return 321 } 322 file_grpc_core_stats_proto_msgTypes[2].OneofWrappers = []any{ 323 (*Metric_Count)(nil), 324 (*Metric_Histogram)(nil), 325 } 326 type x struct{} 327 out := protoimpl.TypeBuilder{ 328 File: protoimpl.DescBuilder{ 329 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 330 RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_core_stats_proto_rawDesc), len(file_grpc_core_stats_proto_rawDesc)), 331 NumEnums: 0, 332 NumMessages: 4, 333 NumExtensions: 0, 334 NumServices: 0, 335 }, 336 GoTypes: file_grpc_core_stats_proto_goTypes, 337 DependencyIndexes: file_grpc_core_stats_proto_depIdxs, 338 MessageInfos: file_grpc_core_stats_proto_msgTypes, 339 }.Build() 340 File_grpc_core_stats_proto = out.File 341 file_grpc_core_stats_proto_goTypes = nil 342 file_grpc_core_stats_proto_depIdxs = nil 343 }