metrics.pb.go 13 KB

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