| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>JSDoc: Home</title>
- <script src="scripts/prettify/prettify.js"> </script>
- <script src="scripts/prettify/lang-css.js"> </script>
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
- </head>
- <body>
- <div id="main">
- <h1 class="page-title">Home</h1>
-
-
- <h3>grpc 1.0.0</h3>
-
- <section>
- <article><p><a href="https://www.npmjs.com/package/grpc"><img src="https://img.shields.io/npm/v/grpc.svg" alt="npm"></a></p>
- <h1>Node.js gRPC Library</h1><h2>Status</h2><p>Beta</p>
- <h2>PREREQUISITES</h2><ul>
- <li><p><code>node</code>: This requires <code>node</code> to be installed, version <code>0.12</code> or above. If you instead have the <code>nodejs</code> executable on Debian, you should install the <a href="https://packages.debian.org/sid/nodejs-legacy"><code>nodejs-legacy</code></a> package.</p>
- </li>
- <li><p><strong>Note:</strong> If you installed <code>node</code> via a package manager and the version is still less than <code>0.12</code>, try directly installing it from <a href="https://nodejs.org">nodejs.org</a>.</p>
- </li>
- </ul>
- <h2>INSTALLATION</h2><p>Install the gRPC NPM package</p>
- <pre class="prettyprint source lang-sh"><code>npm install grpc</code></pre><h2>BUILD FROM SOURCE</h2><ol>
- <li>Clone <a href="https://github.com/grpc/grpc">the grpc Git Repository</a>.</li>
- <li><p>Run <code>npm install</code> from the repository root.</p>
- </li>
- <li><p><strong>Note:</strong> On Windows, this might fail due to <a href="https://github.com/nodejs/node/issues/4932">nodejs issue #4932</a> in which case, you will see something like the following in <code>npm install</code>'s output (towards the very beginning):</p>
- <pre class="prettyprint source"><code> ..
- Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
- WINDOWS_BUILD_WARNING
- "..\IMPORTANT: Due to https:\github.com\nodejs\node\issues\4932, to build this library on Windows, you must first remove C:\Users\jenkins\.node-gyp\4.4.0\include\node\openssl"
- ...
- ..</code></pre><p> To fix this, you will have to delete the folder <code>C:\Users\<username>\.node-gyp\<node_version>\include\node\openssl</code> and retry <code>npm install</code></p>
- </li>
- </ol>
- <h2>TESTING</h2><p>To run the test suite, simply run <code>npm test</code> in the install location.</p>
- <h2>API</h2><p>This library internally uses <a href="https://github.com/dcodeIO/ProtoBuf.js">ProtoBuf.js</a>, and some structures it exports match those exported by that library</p>
- <p>If you require this module, you will get an object with the following members</p>
- <pre class="prettyprint source lang-javascript"><code>function load(filename)</code></pre><p>Takes a filename of a <a href="https://developers.google.com/protocol-buffers/">Protocol Buffer</a> file, and returns an object representing the structure of the protocol buffer in the following way:</p>
- <ul>
- <li>Namespaces become maps from the names of their direct members to those member objects</li>
- <li>Service definitions become client constructors for clients for that service. They also have a <code>service</code> member that can be used for constructing servers.</li>
- <li>Message definitions become Message constructors like those that ProtoBuf.js would create</li>
- <li>Enum definitions become Enum objects like those that ProtoBuf.js would create</li>
- <li>Anything else becomes the relevant reflection object that ProtoBuf.js would create</li>
- </ul>
- <pre class="prettyprint source lang-javascript"><code>function loadObject(reflectionObject)</code></pre><p>Returns the same structure that <code>load</code> returns, but takes a reflection object from <code>ProtoBuf.js</code> instead of a file name.</p>
- <pre class="prettyprint source lang-javascript"><code>function Server([serverOpions])</code></pre><p>Constructs a server to which service/implementation pairs can be added.</p>
- <pre class="prettyprint source lang-javascript"><code>status</code></pre><p>An object mapping status names to status code numbers.</p>
- <pre class="prettyprint source lang-javascript"><code>callError</code></pre><p>An object mapping call error names to codes. This is primarily useful for tracking down certain kinds of internal errors.</p>
- <pre class="prettyprint source lang-javascript"><code>Credentials</code></pre><p>An object with factory methods for creating credential objects for clients.</p>
- <pre class="prettyprint source lang-javascript"><code>ServerCredentials</code></pre><p>An object with factory methods for creating credential objects for servers.</p></article>
- </section>
- </div>
- <nav>
- <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#getClientChannel">getClientChannel</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#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>
- </nav>
- <br class="clear">
- <footer>
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Aug 18 2016 12:19:14 GMT-0700 (PDT)
- </footer>
- <script> prettyPrint(); </script>
- <script src="scripts/linenumber.js"> </script>
- </body>
- </html>
|