module-src_client.html 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Module: src/client</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/client</h1>
  17. <section>
  18. <header>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <div class="description">Client module
  23. This module contains the factory method for creating Client classes, and the
  24. method calling code for all types of methods.
  25. For example, to create a client and call a method on it:
  26. var proto_obj = grpc.load(proto_file_path);
  27. var Client = proto_obj.package.subpackage.ServiceName;
  28. var client = new Client(server_address, client_credentials);
  29. var call = client.unaryMethod(arguments, callback);</div>
  30. <dl class="details">
  31. <dt class="tag-source">Source:</dt>
  32. <dd class="tag-source"><ul class="dummy"><li>
  33. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line34">line 34</a>
  34. </li></ul></dd>
  35. </dl>
  36. </div>
  37. <h3 class="subsection-title">Classes</h3>
  38. <dl>
  39. <dt><a href="module-src_client-ClientDuplexStream.html">ClientDuplexStream</a></dt>
  40. <dd></dd>
  41. <dt><a href="module-src_client-ClientReadableStream.html">ClientReadableStream</a></dt>
  42. <dd></dd>
  43. <dt><a href="module-src_client-ClientWritableStream.html">ClientWritableStream</a></dt>
  44. <dd></dd>
  45. </dl>
  46. <h3 class="subsection-title">Members</h3>
  47. <h4 class="name" id=".callError"><span class="type-signature">(static) </span>callError<span class="type-signature"></span></h4>
  48. <div class="description">
  49. See docs for client.callError
  50. </div>
  51. <dl class="details">
  52. <dt class="tag-source">Source:</dt>
  53. <dd class="tag-source"><ul class="dummy"><li>
  54. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line719">line 719</a>
  55. </li></ul></dd>
  56. </dl>
  57. <h4 class="name" id=".status"><span class="type-signature">(static) </span>status<span class="type-signature"></span></h4>
  58. <div class="description">
  59. Map of status code names to status codes
  60. </div>
  61. <dl class="details">
  62. <dt class="tag-source">Source:</dt>
  63. <dd class="tag-source"><ul class="dummy"><li>
  64. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line714">line 714</a>
  65. </li></ul></dd>
  66. </dl>
  67. <h4 class="name" id="~requester_makers"><span class="type-signature">(inner) </span>requester_makers<span class="type-signature"></span></h4>
  68. <div class="description">
  69. Map with short names for each of the requester maker functions. Used in
  70. makeClientConstructor
  71. </div>
  72. <dl class="details">
  73. <dt class="tag-source">Source:</dt>
  74. <dd class="tag-source"><ul class="dummy"><li>
  75. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line582">line 582</a>
  76. </li></ul></dd>
  77. </dl>
  78. <h3 class="subsection-title">Methods</h3>
  79. <h4 class="name" id=".getClientChannel"><span class="type-signature">(static) </span>getClientChannel<span class="signature">(client)</span><span class="type-signature"> &rarr; {Channel}</span></h4>
  80. <div class="description">
  81. Return the underlying channel object for the specified client
  82. </div>
  83. <h5>Parameters:</h5>
  84. <table class="params">
  85. <thead>
  86. <tr>
  87. <th>Name</th>
  88. <th>Type</th>
  89. <th class="last">Description</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. <tr>
  94. <td class="name"><code>client</code></td>
  95. <td class="type">
  96. <span class="param-type">Client</span>
  97. </td>
  98. <td class="description last"></td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. <dl class="details">
  103. <dt class="tag-source">Source:</dt>
  104. <dd class="tag-source"><ul class="dummy"><li>
  105. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line663">line 663</a>
  106. </li></ul></dd>
  107. </dl>
  108. <h5>Returns:</h5>
  109. <div class="param-desc">
  110. The channel
  111. </div>
  112. <dl>
  113. <dt>
  114. Type
  115. </dt>
  116. <dd>
  117. <span class="param-type">Channel</span>
  118. </dd>
  119. </dl>
  120. <h4 class="name" id=".makeClientConstructor"><span class="type-signature">(static) </span>makeClientConstructor<span class="signature">(methods, serviceName)</span><span class="type-signature"> &rarr; {function}</span></h4>
  121. <div class="description">
  122. Creates a constructor for a client with the given methods. The methods object
  123. maps method name to an object with the following keys:
  124. path: The path on the server for accessing the method. For example, for
  125. protocol buffers, we use "/service_name/method_name"
  126. requestStream: bool indicating whether the client sends a stream
  127. resonseStream: bool indicating whether the server sends a stream
  128. requestSerialize: function to serialize request objects
  129. responseDeserialize: function to deserialize response objects
  130. </div>
  131. <h5>Parameters:</h5>
  132. <table class="params">
  133. <thead>
  134. <tr>
  135. <th>Name</th>
  136. <th>Type</th>
  137. <th class="last">Description</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <tr>
  142. <td class="name"><code>methods</code></td>
  143. <td class="type">
  144. <span class="param-type">Object</span>
  145. </td>
  146. <td class="description last">An object mapping method names to method attributes</td>
  147. </tr>
  148. <tr>
  149. <td class="name"><code>serviceName</code></td>
  150. <td class="type">
  151. <span class="param-type">string</span>
  152. </td>
  153. <td class="description last">The fully qualified name of the service</td>
  154. </tr>
  155. </tbody>
  156. </table>
  157. <dl class="details">
  158. <dt class="tag-source">Source:</dt>
  159. <dd class="tag-source"><ul class="dummy"><li>
  160. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line602">line 602</a>
  161. </li></ul></dd>
  162. </dl>
  163. <h5>Returns:</h5>
  164. <div class="param-desc">
  165. New client constructor
  166. </div>
  167. <dl>
  168. <dt>
  169. Type
  170. </dt>
  171. <dd>
  172. <span class="param-type">function</span>
  173. </dd>
  174. </dl>
  175. <h4 class="name" id=".makeProtobufClientConstructor"><span class="type-signature">(static) </span>makeProtobufClientConstructor<span class="signature">(service)</span><span class="type-signature"> &rarr; {function}</span></h4>
  176. <div class="description">
  177. Creates a constructor for clients for the given service
  178. </div>
  179. <h5>Parameters:</h5>
  180. <table class="params">
  181. <thead>
  182. <tr>
  183. <th>Name</th>
  184. <th>Type</th>
  185. <th class="last">Description</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. <tr>
  190. <td class="name"><code>service</code></td>
  191. <td class="type">
  192. <span class="param-type">ProtoBuf.Reflect.Service</span>
  193. </td>
  194. <td class="description last">The service to generate a client
  195. for</td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. <dl class="details">
  200. <dt class="tag-source">Source:</dt>
  201. <dd class="tag-source"><ul class="dummy"><li>
  202. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line703">line 703</a>
  203. </li></ul></dd>
  204. </dl>
  205. <h5>Returns:</h5>
  206. <div class="param-desc">
  207. New client constructor
  208. </div>
  209. <dl>
  210. <dt>
  211. Type
  212. </dt>
  213. <dd>
  214. <span class="param-type">function</span>
  215. </dd>
  216. </dl>
  217. <h4 class="name" id=".waitForClientReady"><span class="type-signature">(static) </span>waitForClientReady<span class="signature">(client, deadline, callback)</span><span class="type-signature"></span></h4>
  218. <div class="description">
  219. Wait for the client to be ready. The callback will be called when the
  220. client has successfully connected to the server, and it will be called
  221. with an error if the attempt to connect to the server has unrecoverablly
  222. failed or if the deadline expires. This function will make the channel
  223. start connecting if it has not already done so.
  224. </div>
  225. <h5>Parameters:</h5>
  226. <table class="params">
  227. <thead>
  228. <tr>
  229. <th>Name</th>
  230. <th>Type</th>
  231. <th class="last">Description</th>
  232. </tr>
  233. </thead>
  234. <tbody>
  235. <tr>
  236. <td class="name"><code>client</code></td>
  237. <td class="type">
  238. <span class="param-type">Client</span>
  239. </td>
  240. <td class="description last">The client to wait on</td>
  241. </tr>
  242. <tr>
  243. <td class="name"><code>deadline</code></td>
  244. <td class="type">
  245. <span class="param-type">Date</span>
  246. |
  247. <span class="param-type">Number</span>
  248. </td>
  249. <td class="description last">When to stop waiting for a connection. Pass
  250. Infinity to wait forever.</td>
  251. </tr>
  252. <tr>
  253. <td class="name"><code>callback</code></td>
  254. <td class="type">
  255. <span class="param-type">function</span>
  256. </td>
  257. <td class="description last">The callback to call when done attempting
  258. to connect.</td>
  259. </tr>
  260. </tbody>
  261. </table>
  262. <dl class="details">
  263. <dt class="tag-source">Source:</dt>
  264. <dd class="tag-source"><ul class="dummy"><li>
  265. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line679">line 679</a>
  266. </li></ul></dd>
  267. </dl>
  268. <h4 class="name" id="~cancel"><span class="type-signature">(inner) </span>cancel<span class="signature">()</span><span class="type-signature"></span></h4>
  269. <div class="description">
  270. Cancel the ongoing call
  271. </div>
  272. <dl class="details">
  273. <dt class="tag-source">Source:</dt>
  274. <dd class="tag-source"><ul class="dummy"><li>
  275. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line214">line 214</a>
  276. </li></ul></dd>
  277. </dl>
  278. <h4 class="name" id="~getCall"><span class="type-signature">(inner) </span>getCall<span class="signature">(options)</span><span class="type-signature"></span></h4>
  279. <div class="description">
  280. Get a call object built with the provided options. Keys for options are
  281. 'deadline', which takes a date or number, and 'host', which takes a string
  282. and overrides the hostname to connect to.
  283. </div>
  284. <h5>Parameters:</h5>
  285. <table class="params">
  286. <thead>
  287. <tr>
  288. <th>Name</th>
  289. <th>Type</th>
  290. <th class="last">Description</th>
  291. </tr>
  292. </thead>
  293. <tbody>
  294. <tr>
  295. <td class="name"><code>options</code></td>
  296. <td class="type">
  297. <span class="param-type">Object</span>
  298. </td>
  299. <td class="description last">Options map.</td>
  300. </tr>
  301. </tbody>
  302. </table>
  303. <dl class="details">
  304. <dt class="tag-source">Source:</dt>
  305. <dd class="tag-source"><ul class="dummy"><li>
  306. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line242">line 242</a>
  307. </li></ul></dd>
  308. </dl>
  309. <h4 class="name" id="~getPeer"><span class="type-signature">(inner) </span>getPeer<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  310. <div class="description">
  311. Get the endpoint this call/stream is connected to.
  312. </div>
  313. <dl class="details">
  314. <dt class="tag-source">Source:</dt>
  315. <dd class="tag-source"><ul class="dummy"><li>
  316. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line227">line 227</a>
  317. </li></ul></dd>
  318. </dl>
  319. <h5>Returns:</h5>
  320. <div class="param-desc">
  321. The URI of the endpoint
  322. </div>
  323. <dl>
  324. <dt>
  325. Type
  326. </dt>
  327. <dd>
  328. <span class="param-type">string</span>
  329. </dd>
  330. </dl>
  331. <h4 class="name" id="~makeBidiStreamRequestFunction"><span class="type-signature">(inner) </span>makeBidiStreamRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  332. <div class="description">
  333. Get a function that can make bidirectional stream requests to the specified
  334. method.
  335. </div>
  336. <h5>Parameters:</h5>
  337. <table class="params">
  338. <thead>
  339. <tr>
  340. <th>Name</th>
  341. <th>Type</th>
  342. <th class="last">Description</th>
  343. </tr>
  344. </thead>
  345. <tbody>
  346. <tr>
  347. <td class="name"><code>method</code></td>
  348. <td class="type">
  349. <span class="param-type">string</span>
  350. </td>
  351. <td class="description last">The name of the method to request</td>
  352. </tr>
  353. <tr>
  354. <td class="name"><code>serialize</code></td>
  355. <td class="type">
  356. <span class="param-type">function</span>
  357. </td>
  358. <td class="description last">The serialization function for inputs</td>
  359. </tr>
  360. <tr>
  361. <td class="name"><code>deserialize</code></td>
  362. <td class="type">
  363. <span class="param-type">function</span>
  364. </td>
  365. <td class="description last">The deserialization function for
  366. outputs</td>
  367. </tr>
  368. </tbody>
  369. </table>
  370. <dl class="details">
  371. <dt class="tag-source">Source:</dt>
  372. <dd class="tag-source"><ul class="dummy"><li>
  373. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line521">line 521</a>
  374. </li></ul></dd>
  375. </dl>
  376. <h5>Returns:</h5>
  377. <div class="param-desc">
  378. makeBidiStreamRequest
  379. </div>
  380. <dl>
  381. <dt>
  382. Type
  383. </dt>
  384. <dd>
  385. <span class="param-type">function</span>
  386. </dd>
  387. </dl>
  388. <h4 class="name" id="~makeClientStreamRequestFunction"><span class="type-signature">(inner) </span>makeClientStreamRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  389. <div class="description">
  390. Get a function that can make client stream requests to the specified method.
  391. </div>
  392. <h5>Parameters:</h5>
  393. <table class="params">
  394. <thead>
  395. <tr>
  396. <th>Name</th>
  397. <th>Type</th>
  398. <th class="last">Description</th>
  399. </tr>
  400. </thead>
  401. <tbody>
  402. <tr>
  403. <td class="name"><code>method</code></td>
  404. <td class="type">
  405. <span class="param-type">string</span>
  406. </td>
  407. <td class="description last">The name of the method to request</td>
  408. </tr>
  409. <tr>
  410. <td class="name"><code>serialize</code></td>
  411. <td class="type">
  412. <span class="param-type">function</span>
  413. </td>
  414. <td class="description last">The serialization function for inputs</td>
  415. </tr>
  416. <tr>
  417. <td class="name"><code>deserialize</code></td>
  418. <td class="type">
  419. <span class="param-type">function</span>
  420. </td>
  421. <td class="description last">The deserialization function for
  422. outputs</td>
  423. </tr>
  424. </tbody>
  425. </table>
  426. <dl class="details">
  427. <dt class="tag-source">Source:</dt>
  428. <dd class="tag-source"><ul class="dummy"><li>
  429. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line363">line 363</a>
  430. </li></ul></dd>
  431. </dl>
  432. <h5>Returns:</h5>
  433. <div class="param-desc">
  434. makeClientStreamRequest
  435. </div>
  436. <dl>
  437. <dt>
  438. Type
  439. </dt>
  440. <dd>
  441. <span class="param-type">function</span>
  442. </dd>
  443. </dl>
  444. <h4 class="name" id="~makeServerStreamRequestFunction"><span class="type-signature">(inner) </span>makeServerStreamRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  445. <div class="description">
  446. Get a function that can make server stream requests to the specified method.
  447. </div>
  448. <h5>Parameters:</h5>
  449. <table class="params">
  450. <thead>
  451. <tr>
  452. <th>Name</th>
  453. <th>Type</th>
  454. <th class="last">Description</th>
  455. </tr>
  456. </thead>
  457. <tbody>
  458. <tr>
  459. <td class="name"><code>method</code></td>
  460. <td class="type">
  461. <span class="param-type">string</span>
  462. </td>
  463. <td class="description last">The name of the method to request</td>
  464. </tr>
  465. <tr>
  466. <td class="name"><code>serialize</code></td>
  467. <td class="type">
  468. <span class="param-type">function</span>
  469. </td>
  470. <td class="description last">The serialization function for inputs</td>
  471. </tr>
  472. <tr>
  473. <td class="name"><code>deserialize</code></td>
  474. <td class="type">
  475. <span class="param-type">function</span>
  476. </td>
  477. <td class="description last">The deserialization function for
  478. outputs</td>
  479. </tr>
  480. </tbody>
  481. </table>
  482. <dl class="details">
  483. <dt class="tag-source">Source:</dt>
  484. <dd class="tag-source"><ul class="dummy"><li>
  485. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line447">line 447</a>
  486. </li></ul></dd>
  487. </dl>
  488. <h5>Returns:</h5>
  489. <div class="param-desc">
  490. makeServerStreamRequest
  491. </div>
  492. <dl>
  493. <dt>
  494. Type
  495. </dt>
  496. <dd>
  497. <span class="param-type">function</span>
  498. </dd>
  499. </dl>
  500. <h4 class="name" id="~makeUnaryRequestFunction"><span class="type-signature">(inner) </span>makeUnaryRequestFunction<span class="signature">(method, serialize, deserialize)</span><span class="type-signature"> &rarr; {function}</span></h4>
  501. <div class="description">
  502. Get a function that can make unary requests to the specified method.
  503. </div>
  504. <h5>Parameters:</h5>
  505. <table class="params">
  506. <thead>
  507. <tr>
  508. <th>Name</th>
  509. <th>Type</th>
  510. <th class="last">Description</th>
  511. </tr>
  512. </thead>
  513. <tbody>
  514. <tr>
  515. <td class="name"><code>method</code></td>
  516. <td class="type">
  517. <span class="param-type">string</span>
  518. </td>
  519. <td class="description last">The name of the method to request</td>
  520. </tr>
  521. <tr>
  522. <td class="name"><code>serialize</code></td>
  523. <td class="type">
  524. <span class="param-type">function</span>
  525. </td>
  526. <td class="description last">The serialization function for inputs</td>
  527. </tr>
  528. <tr>
  529. <td class="name"><code>deserialize</code></td>
  530. <td class="type">
  531. <span class="param-type">function</span>
  532. </td>
  533. <td class="description last">The deserialization function for
  534. outputs</td>
  535. </tr>
  536. </tbody>
  537. </table>
  538. <dl class="details">
  539. <dt class="tag-source">Source:</dt>
  540. <dd class="tag-source"><ul class="dummy"><li>
  541. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line274">line 274</a>
  542. </li></ul></dd>
  543. </dl>
  544. <h5>Returns:</h5>
  545. <div class="param-desc">
  546. makeUnaryRequest
  547. </div>
  548. <dl>
  549. <dt>
  550. Type
  551. </dt>
  552. <dd>
  553. <span class="param-type">function</span>
  554. </dd>
  555. </dl>
  556. </article>
  557. </section>
  558. </div>
  559. <nav>
  560. <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#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#status">status</a></li><li><a href="global.html#waitForClientReady">waitForClientReady</a></li><li><a href="global.html#writeFlags">writeFlags</a></li></ul>
  561. </nav>
  562. <br class="clear">
  563. <footer>
  564. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
  565. </footer>
  566. <script> prettyPrint(); </script>
  567. <script src="scripts/linenumber.js"> </script>
  568. </body>
  569. </html>