Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

195 Zeilen
6.3 KiB

  1. /**
  2. * @fileoverview gRPC-Web generated client stub for JT808.GrpcDashbord.AtomicCounterGrpcService
  3. * @enhanceable
  4. * @public
  5. */
  6. // GENERATED CODE -- DO NOT EDIT!
  7. const grpc = {};
  8. grpc.web = require('grpc-web');
  9. var ResultReply_pb = require('./ResultReply_pb.js')
  10. var EmptyRequest_pb = require('./EmptyRequest_pb.js')
  11. const proto = {};
  12. proto.JT808 = {};
  13. proto.JT808.GrpcDashbord = {};
  14. proto.JT808.GrpcDashbord.AtomicCounterGrpcService = require('./JT808AtomicCounterService_pb.js');
  15. /**
  16. * @param {string} hostname
  17. * @param {?Object} credentials
  18. * @param {?Object} options
  19. * @constructor
  20. * @struct
  21. * @final
  22. */
  23. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient =
  24. function(hostname, credentials, options) {
  25. if (!options) options = {};
  26. options['format'] = 'text';
  27. /**
  28. * @private @const {!grpc.web.GrpcWebClientBase} The client
  29. */
  30. this.client_ = new grpc.web.GrpcWebClientBase(options);
  31. /**
  32. * @private @const {string} The hostname
  33. */
  34. this.hostname_ = hostname;
  35. /**
  36. * @private @const {?Object} The credentials to be used to connect
  37. * to the server
  38. */
  39. this.credentials_ = credentials;
  40. /**
  41. * @private @const {?Object} Options for the client
  42. */
  43. this.options_ = options;
  44. };
  45. /**
  46. * @param {string} hostname
  47. * @param {?Object} credentials
  48. * @param {?Object} options
  49. * @constructor
  50. * @struct
  51. * @final
  52. */
  53. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServicePromiseClient =
  54. function(hostname, credentials, options) {
  55. if (!options) options = {};
  56. options['format'] = 'text';
  57. /**
  58. * @private @const {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient} The delegate callback based client
  59. */
  60. this.delegateClient_ = new proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient(
  61. hostname, credentials, options);
  62. };
  63. /**
  64. * @const
  65. * @type {!grpc.web.AbstractClientBase.MethodInfo<
  66. * !proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest,
  67. * !proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
  68. */
  69. const methodInfo_AtomicCounterService_GetTcpAtomicCounter = new grpc.web.AbstractClientBase.MethodInfo(
  70. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply,
  71. /** @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request */
  72. function(request) {
  73. return request.serializeBinary();
  74. },
  75. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinary
  76. );
  77. /**
  78. * @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
  79. * request proto
  80. * @param {!Object<string, string>} metadata User defined
  81. * call metadata
  82. * @param {function(?grpc.web.Error, ?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply)}
  83. * callback The callback function(error, response)
  84. * @return {!grpc.web.ClientReadableStream<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>|undefined}
  85. * The XHR Node Readable Stream
  86. */
  87. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient.prototype.getTcpAtomicCounter =
  88. function(request, metadata, callback) {
  89. return this.client_.rpcCall(this.hostname_ +
  90. '/JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterService/GetTcpAtomicCounter',
  91. request,
  92. metadata,
  93. methodInfo_AtomicCounterService_GetTcpAtomicCounter,
  94. callback);
  95. };
  96. /**
  97. * @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
  98. * request proto
  99. * @param {!Object<string, string>} metadata User defined
  100. * call metadata
  101. * @return {!Promise<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
  102. * The XHR Node Readable Stream
  103. */
  104. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServicePromiseClient.prototype.getTcpAtomicCounter =
  105. function(request, metadata) {
  106. return new Promise((resolve, reject) => {
  107. this.delegateClient_.getTcpAtomicCounter(
  108. request, metadata, (error, response) => {
  109. error ? reject(error) : resolve(response);
  110. });
  111. });
  112. };
  113. /**
  114. * @const
  115. * @type {!grpc.web.AbstractClientBase.MethodInfo<
  116. * !proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest,
  117. * !proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
  118. */
  119. const methodInfo_AtomicCounterService_GetUdpAtomicCounter = new grpc.web.AbstractClientBase.MethodInfo(
  120. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply,
  121. /** @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request */
  122. function(request) {
  123. return request.serializeBinary();
  124. },
  125. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinary
  126. );
  127. /**
  128. * @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
  129. * request proto
  130. * @param {!Object<string, string>} metadata User defined
  131. * call metadata
  132. * @param {function(?grpc.web.Error, ?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply)}
  133. * callback The callback function(error, response)
  134. * @return {!grpc.web.ClientReadableStream<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>|undefined}
  135. * The XHR Node Readable Stream
  136. */
  137. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient.prototype.getUdpAtomicCounter =
  138. function(request, metadata, callback) {
  139. return this.client_.rpcCall(this.hostname_ +
  140. '/JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterService/GetUdpAtomicCounter',
  141. request,
  142. metadata,
  143. methodInfo_AtomicCounterService_GetUdpAtomicCounter,
  144. callback);
  145. };
  146. /**
  147. * @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
  148. * request proto
  149. * @param {!Object<string, string>} metadata User defined
  150. * call metadata
  151. * @return {!Promise<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
  152. * The XHR Node Readable Stream
  153. */
  154. proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServicePromiseClient.prototype.getUdpAtomicCounter =
  155. function(request, metadata) {
  156. return new Promise((resolve, reject) => {
  157. this.delegateClient_.getUdpAtomicCounter(
  158. request, metadata, (error, response) => {
  159. error ? reject(error) : resolve(response);
  160. });
  161. });
  162. };
  163. module.exports = proto.JT808.GrpcDashbord.AtomicCounterGrpcService;