module-src_common.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Module: src/common</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Module: src/common</h1>
  17. <section>
  18. <header>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <div class="description">This module contains functions that are common to client and server
  23. code. None of them should be used directly by gRPC users.</div>
  24. <dl class="details">
  25. <dt class="tag-source">Source:</dt>
  26. <dd class="tag-source"><ul class="dummy"><li>
  27. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line34">line 34</a>
  28. </li></ul></dd>
  29. </dl>
  30. </div>
  31. <h3 class="subsection-title">Members</h3>
  32. <h4 class="name" id=".defaultGrpcOptions"><span class="type-signature">(static) </span>defaultGrpcOptions<span class="type-signature"></span></h4>
  33. <div class="description">
  34. Default options for loading proto files into gRPC
  35. </div>
  36. <dl class="details">
  37. <dt class="tag-source">Source:</dt>
  38. <dd class="tag-source"><ul class="dummy"><li>
  39. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line86">line 86</a>
  40. </li></ul></dd>
  41. </dl>
  42. <h4 class="name" id=".logger"><span class="type-signature">(static) </span>logger<span class="type-signature"></span></h4>
  43. <div class="description">
  44. The logger object for the gRPC module. Defaults to console.
  45. </div>
  46. <dl class="details">
  47. <dt class="tag-source">Source:</dt>
  48. <dd class="tag-source"><ul class="dummy"><li>
  49. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line65">line 65</a>
  50. </li></ul></dd>
  51. </dl>
  52. <h4 class="name" id=".logVerbosity"><span class="type-signature">(static) </span>logVerbosity<span class="type-signature"></span></h4>
  53. <div class="description">
  54. The current logging verbosity. 0 corresponds to logging everything
  55. </div>
  56. <dl class="details">
  57. <dt class="tag-source">Source:</dt>
  58. <dd class="tag-source"><ul class="dummy"><li>
  59. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line70">line 70</a>
  60. </li></ul></dd>
  61. </dl>
  62. <h3 class="subsection-title">Methods</h3>
  63. <h4 class="name" id=".log"><span class="type-signature">(static) </span>log<span class="signature">(severity, message)</span><span class="type-signature"></span></h4>
  64. <div class="description">
  65. Log a message if the severity is at least as high as the current verbosity
  66. </div>
  67. <h5>Parameters:</h5>
  68. <table class="params">
  69. <thead>
  70. <tr>
  71. <th>Name</th>
  72. <th>Type</th>
  73. <th class="last">Description</th>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. <tr>
  78. <td class="name"><code>severity</code></td>
  79. <td class="type">
  80. <span class="param-type">Number</span>
  81. </td>
  82. <td class="description last">A value of the grpc.logVerbosity map</td>
  83. </tr>
  84. <tr>
  85. <td class="name"><code>message</code></td>
  86. <td class="type">
  87. <span class="param-type">String</span>
  88. </td>
  89. <td class="description last">The message to log</td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <dl class="details">
  94. <dt class="tag-source">Source:</dt>
  95. <dd class="tag-source"><ul class="dummy"><li>
  96. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line77">line 77</a>
  97. </li></ul></dd>
  98. </dl>
  99. <h4 class="name" id=".wrapIgnoreNull"><span class="type-signature">(static) </span>wrapIgnoreNull<span class="signature">(func<span class="signature-attributes">nullable</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
  100. <div class="description">
  101. Wrap a function to pass null-like values through without calling it. If no
  102. function is given, just uses the identity;
  103. </div>
  104. <h5>Parameters:</h5>
  105. <table class="params">
  106. <thead>
  107. <tr>
  108. <th>Name</th>
  109. <th>Type</th>
  110. <th>Attributes</th>
  111. <th class="last">Description</th>
  112. </tr>
  113. </thead>
  114. <tbody>
  115. <tr>
  116. <td class="name"><code>func</code></td>
  117. <td class="type">
  118. <span class="param-type">function</span>
  119. </td>
  120. <td class="attributes">
  121. &lt;nullable><br>
  122. </td>
  123. <td class="description last">The function to wrap</td>
  124. </tr>
  125. </tbody>
  126. </table>
  127. <dl class="details">
  128. <dt class="tag-source">Source:</dt>
  129. <dd class="tag-source"><ul class="dummy"><li>
  130. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line50">line 50</a>
  131. </li></ul></dd>
  132. </dl>
  133. <h5>Returns:</h5>
  134. <div class="param-desc">
  135. The wrapped function
  136. </div>
  137. <dl>
  138. <dt>
  139. Type
  140. </dt>
  141. <dd>
  142. <span class="param-type">function</span>
  143. </dd>
  144. </dl>
  145. </article>
  146. </section>
  147. </div>
  148. <nav>
  149. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-src_client.html">src/client</a></li><li><a href="module-src_common.html">src/common</a></li><li><a href="module-src_credentials.html">src/credentials</a></li><li><a href="module-src_metadata.html">src/metadata</a></li><li><a href="module-src_server.html">src/server</a></li></ul><h3>Classes</h3><ul><li><a href="module-src_client.makeClientConstructor-Client.html">Client</a></li><li><a href="module-src_client-ClientDuplexStream.html">ClientDuplexStream</a></li><li><a href="module-src_client-ClientReadableStream.html">ClientReadableStream</a></li><li><a href="module-src_client-ClientWritableStream.html">ClientWritableStream</a></li><li><a href="module-src_metadata-Metadata.html">Metadata</a></li><li><a href="module-src_server-Server.html">Server</a></li><li><a href="module-src_server-ServerDuplexStream.html">ServerDuplexStream</a></li><li><a href="module-src_server-ServerReadableStream.html">ServerReadableStream</a></li><li><a href="module-src_server-ServerWritableStream.html">ServerWritableStream</a></li></ul><h3>Global</h3><ul><li><a href="global.html#callError">callError</a></li><li><a href="global.html#credentials">credentials</a></li><li><a href="global.html#deserializeCls">deserializeCls</a></li><li><a href="global.html#fullyQualifiedName">fullyQualifiedName</a></li><li><a href="global.html#getClientChannel">getClientChannel</a></li><li><a href="global.html#getProtobufServiceAttrs">getProtobufServiceAttrs</a></li><li><a href="global.html#isProbablyProtobufJs5">isProbablyProtobufJs5</a></li><li><a href="global.html#isProbablyProtobufJs6">isProbablyProtobufJs6</a></li><li><a href="global.html#load">load</a></li><li><a href="global.html#loadObject">loadObject</a></li><li><a href="global.html#logVerbosity">logVerbosity</a></li><li><a href="global.html#makeGenericClientConstructor">makeGenericClientConstructor</a></li><li><a href="global.html#Metadata">Metadata</a></li><li><a href="global.html#propagate">propagate</a></li><li><a href="global.html#serializeCls">serializeCls</a></li><li><a href="global.html#Server">Server</a></li><li><a href="global.html#ServerCredentials">ServerCredentials</a></li><li><a href="global.html#setLogger">setLogger</a></li><li><a href="global.html#setLogVerbosity">setLogVerbosity</a></li><li><a href="global.html#status">status</a></li><li><a href="global.html#waitForClientReady">waitForClientReady</a></li><li><a href="global.html#writeFlags">writeFlags</a></li></ul>
  150. </nav>
  151. <br class="clear">
  152. <footer>
  153. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Apr 27 2017 17:35:39 GMT-0700 (PDT)
  154. </footer>
  155. <script> prettyPrint(); </script>
  156. <script src="scripts/linenumber.js"> </script>
  157. </body>
  158. </html>