grpc.Client.html 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Documentation Class: Client</title>
  7. <!--[if lt IE 9]>
  8. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  9. <![endif]-->
  10. <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
  11. <link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
  12. </head>
  13. <body>
  14. <div class="navbar navbar-default navbar-fixed-top ">
  15. <div class="container">
  16. <div class="navbar-header">
  17. <a class="navbar-brand" href="index.html">Documentation</a>
  18. <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
  19. <span class="icon-bar"></span>
  20. <span class="icon-bar"></span>
  21. <span class="icon-bar"></span>
  22. </button>
  23. </div>
  24. <div class="navbar-collapse collapse" id="topNavigation">
  25. <ul class="nav navbar-nav">
  26. <li class="dropdown">
  27. <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
  28. <ul class="dropdown-menu ">
  29. <li><a href="grpc.html">grpc</a></li><li><a href="grpc.credentials.html">grpc.credentials</a></li>
  30. </ul>
  31. </li>
  32. <li class="dropdown">
  33. <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
  34. <ul class="dropdown-menu ">
  35. <li><a href="module-src_client_interceptors.html">src/client_interceptors</a></li>
  36. </ul>
  37. </li>
  38. <li class="dropdown">
  39. <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
  40. <ul class="dropdown-menu ">
  41. <li><a href="grpc.Channel.html">grpc.Channel</a></li><li><a href="grpc.Client.html">grpc.Client</a></li><li><a href="grpc.credentials-CallCredentials.html">grpc.credentials~CallCredentials</a></li><li><a href="grpc.credentials-ChannelCredentials.html">grpc.credentials~ChannelCredentials</a></li><li><a href="grpc.Metadata.html">grpc.Metadata</a></li><li><a href="grpc.Server.html">grpc.Server</a></li><li><a href="grpc.ServerCredentials.html">grpc.ServerCredentials</a></li><li><a href="grpc-Call.html">grpc~Call</a></li><li><a href="grpc-ClientDuplexStream.html">grpc~ClientDuplexStream</a></li><li><a href="grpc-ClientReadableStream.html">grpc~ClientReadableStream</a></li><li><a href="grpc-ClientUnaryCall.html">grpc~ClientUnaryCall</a></li><li><a href="grpc-ClientWritableStream.html">grpc~ClientWritableStream</a></li><li><a href="grpc-ServerDuplexStream.html">grpc~ServerDuplexStream</a></li><li><a href="grpc-ServerReadableStream.html">grpc~ServerReadableStream</a></li><li><a href="grpc-ServerUnaryCall.html">grpc~ServerUnaryCall</a></li><li><a href="grpc-ServerWritableStream.html">grpc~ServerWritableStream</a></li><li><a href="module-src_client_interceptors-EndListener.html">src/client_interceptors~EndListener</a></li><li><a href="module-src_client_interceptors-InterceptingCall.html">src/client_interceptors~InterceptingCall</a></li><li><a href="module-src_client_interceptors-InterceptingListener.html">src/client_interceptors~InterceptingListener</a></li><li><a href="module-src_client_interceptors-InterceptorConfigurationError.html">src/client_interceptors~InterceptorConfigurationError</a></li><li><a href="module-src_client_interceptors-ListenerBuilder.html">src/client_interceptors~ListenerBuilder</a></li><li><a href="module-src_client_interceptors-RequesterBuilder.html">src/client_interceptors~RequesterBuilder</a></li><li><a href="module-src_client_interceptors-StatusBuilder.html">src/client_interceptors~StatusBuilder</a></li>
  42. </ul>
  43. </li>
  44. <li class="dropdown">
  45. <a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
  46. <ul class="dropdown-menu ">
  47. <li><a href="grpc-ClientDuplexStream.html#event:metadata">grpc~ClientDuplexStream#metadata</a></li><li><a href="grpc-ClientDuplexStream.html#event:status">grpc~ClientDuplexStream#status</a></li><li><a href="grpc-ClientReadableStream.html#event:metadata">grpc~ClientReadableStream#metadata</a></li><li><a href="grpc-ClientReadableStream.html#event:status">grpc~ClientReadableStream#status</a></li><li><a href="grpc-ClientUnaryCall.html#event:metadata">grpc~ClientUnaryCall#event:metadata</a></li><li><a href="grpc-ClientUnaryCall.html#event:status">grpc~ClientUnaryCall#event:status</a></li><li><a href="grpc-ClientWritableStream.html#event:metadata">grpc~ClientWritableStream#metadata</a></li><li><a href="grpc-ClientWritableStream.html#event:status">grpc~ClientWritableStream#status</a></li><li><a href="grpc-ServerDuplexStream.html#~event:cancelled">grpc~ServerDuplexStream~event:cancelled</a></li><li><a href="grpc-ServerReadableStream.html#~event:cancelled">grpc~ServerReadableStream~event:cancelled</a></li><li><a href="grpc-ServerUnaryCall.html#~event:cancelled">grpc~ServerUnaryCall~event:cancelled</a></li><li><a href="grpc-ServerWritableStream.html#~event:cancelled">grpc~ServerWritableStream~event:cancelled</a></li>
  48. </ul>
  49. </li>
  50. <li class="dropdown">
  51. <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
  52. <ul class="dropdown-menu ">
  53. <li><a href="global.html#CancelRequester">CancelRequester</a></li><li><a href="global.html#CloseRequester">CloseRequester</a></li><li><a href="global.html#createStatusError">createStatusError</a></li><li><a href="global.html#getClientInterceptors">getClientInterceptors</a></li><li><a href="global.html#getMethodType">getMethodType</a></li><li><a href="global.html#GetPeerRequester">GetPeerRequester</a></li><li><a href="global.html#Interceptor">Interceptor</a></li><li><a href="global.html#InterceptorProvider">InterceptorProvider</a></li><li><a href="global.html#loadPackageDefinition">loadPackageDefinition</a></li><li><a href="global.html#MessageListener">MessageListener</a></li><li><a href="global.html#MessageRequester">MessageRequester</a></li><li><a href="global.html#MetadataListener">MetadataListener</a></li><li><a href="global.html#MetadataRequester">MetadataRequester</a></li><li><a href="global.html#NextCall">NextCall</a></li><li><a href="global.html#StatusListener">StatusListener</a></li>
  54. </ul>
  55. </li>
  56. <li class="dropdown">
  57. <a href="externals.list.html" class="dropdown-toggle" data-toggle="dropdown">Externals<b class="caret"></b></a>
  58. <ul class="dropdown-menu ">
  59. <li><a href="external-Duplex.html">Duplex</a></li><li><a href="external-EventEmitter.html">EventEmitter</a></li><li><a href="external-GoogleCredential.html">GoogleCredential</a></li><li><a href="external-Readable.html">Readable</a></li><li><a href="external-Writable.html">Writable</a></li>
  60. </ul>
  61. </li>
  62. </ul>
  63. <div class="col-sm-3 col-md-3">
  64. <form class="navbar-form" role="search">
  65. <div class="input-group">
  66. <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
  67. <div class="input-group-btn">
  68. <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
  69. </div>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="container" id="toc-content">
  77. <div class="row">
  78. <div class="col-md-8">
  79. <div id="main">
  80. <h1 class="page-title">Class: Client</h1>
  81. <section>
  82. <header>
  83. <h2>
  84. <span class="ancestors"><a href="grpc.html">grpc</a>.</span>
  85. Client
  86. </h2>
  87. </header>
  88. <article>
  89. <div class="container-overview">
  90. <hr>
  91. <dt>
  92. <h4 class="name" id="Client"><span class="type-signature"></span>new Client(address, credentials, options)</h4>
  93. </dt>
  94. <dd>
  95. <div class="description">
  96. <p>A generic gRPC client. Primarily useful as a base class for generated clients</p>
  97. </div>
  98. <h5>Parameters:</h5>
  99. <table class="params table table-striped">
  100. <thead>
  101. <tr>
  102. <th>Name</th>
  103. <th>Type</th>
  104. <th class="last">Description</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <tr>
  109. <td class="name"><code>address</code></td>
  110. <td class="type">
  111. <span class="param-type">string</span>
  112. </td>
  113. <td class="description last"><p>Server address to connect to</p></td>
  114. </tr>
  115. <tr>
  116. <td class="name"><code>credentials</code></td>
  117. <td class="type">
  118. <span class="param-type"><a href="grpc.credentials-ChannelCredentials.html">grpc.credentials~ChannelCredentials</a></span>
  119. </td>
  120. <td class="description last"><p>Credentials to use
  121. to connect to the server</p></td>
  122. </tr>
  123. <tr>
  124. <td class="name"><code>options</code></td>
  125. <td class="type">
  126. <span class="param-type">Object</span>
  127. </td>
  128. <td class="description last"><p>Options to apply to channel creation</p></td>
  129. </tr>
  130. </tbody>
  131. </table>
  132. <dl class="details">
  133. </dl>
  134. </dd>
  135. </div>
  136. <h3 class="subsection-title">Methods</h3>
  137. <dl>
  138. <hr>
  139. <dt>
  140. <h4 class="name" id="close"><span class="type-signature"></span>close()</h4>
  141. </dt>
  142. <dd>
  143. <div class="description">
  144. <p>Close this client.</p>
  145. </div>
  146. <dl class="details">
  147. </dl>
  148. </dd>
  149. <hr>
  150. <dt>
  151. <h4 class="name" id="getChannel"><span class="type-signature"></span>getChannel()</h4>
  152. </dt>
  153. <dd>
  154. <div class="description">
  155. <p>Return the underlying channel object for the specified client</p>
  156. </div>
  157. <dl class="details">
  158. </dl>
  159. <h5>Returns:</h5>
  160. <div class="param-desc">
  161. <p>The channel</p>
  162. </div>
  163. <dl>
  164. <dt>
  165. Type
  166. </dt>
  167. <dd>
  168. <span class="param-type">Channel</span>
  169. </dd>
  170. </dl>
  171. </dd>
  172. <hr>
  173. <dt>
  174. <h4 class="name" id="makeBidiStreamRequest"><span class="type-signature"></span>makeBidiStreamRequest(path, serialize, deserialize [, metadata] [, options])</h4>
  175. </dt>
  176. <dd>
  177. <div class="description">
  178. <p>Make a bidirectional stream request with this method on the given channel.</p>
  179. </div>
  180. <h5>Parameters:</h5>
  181. <table class="params table table-striped">
  182. <thead>
  183. <tr>
  184. <th>Name</th>
  185. <th>Type</th>
  186. <th>Argument</th>
  187. <th class="last">Description</th>
  188. </tr>
  189. </thead>
  190. <tbody>
  191. <tr>
  192. <td class="name"><code>path</code></td>
  193. <td class="type">
  194. <span class="param-type">string</span>
  195. </td>
  196. <td class="attributes">
  197. </td>
  198. <td class="description last"><p>The path of the method to request</p></td>
  199. </tr>
  200. <tr>
  201. <td class="name"><code>serialize</code></td>
  202. <td class="type">
  203. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  204. </td>
  205. <td class="attributes">
  206. </td>
  207. <td class="description last"><p>The serialization function for inputs</p></td>
  208. </tr>
  209. <tr>
  210. <td class="name"><code>deserialize</code></td>
  211. <td class="type">
  212. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  213. </td>
  214. <td class="attributes">
  215. </td>
  216. <td class="description last"><p>The deserialization
  217. function for outputs</p></td>
  218. </tr>
  219. <tr>
  220. <td class="name"><code>metadata</code></td>
  221. <td class="type">
  222. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  223. </td>
  224. <td class="attributes">
  225. &lt;optional><br>
  226. </td>
  227. <td class="description last"><p>Array of metadata key/value
  228. pairs to add to the call</p></td>
  229. </tr>
  230. <tr>
  231. <td class="name"><code>options</code></td>
  232. <td class="type">
  233. <span class="param-type"><a href="grpc.Client.html#~CallOptions">grpc.Client~CallOptions</a></span>
  234. </td>
  235. <td class="attributes">
  236. &lt;optional><br>
  237. </td>
  238. <td class="description last"><p>Options map</p></td>
  239. </tr>
  240. </tbody>
  241. </table>
  242. <dl class="details">
  243. </dl>
  244. <h5>Returns:</h5>
  245. <div class="param-desc">
  246. <p>An event emitter for stream related events</p>
  247. </div>
  248. <dl>
  249. <dt>
  250. Type
  251. </dt>
  252. <dd>
  253. <span class="param-type"><a href="grpc-ClientDuplexStream.html">grpc~ClientDuplexStream</a></span>
  254. </dd>
  255. </dl>
  256. </dd>
  257. <hr>
  258. <dt>
  259. <h4 class="name" id="makeClientStreamRequest"><span class="type-signature"></span>makeClientStreamRequest(path, serialize, deserialize [, metadata] [, options], callback)</h4>
  260. </dt>
  261. <dd>
  262. <div class="description">
  263. <p>Make a client stream request to the given method, using the given serialize
  264. and deserialize functions, with the given argument.</p>
  265. </div>
  266. <h5>Parameters:</h5>
  267. <table class="params table table-striped">
  268. <thead>
  269. <tr>
  270. <th>Name</th>
  271. <th>Type</th>
  272. <th>Argument</th>
  273. <th class="last">Description</th>
  274. </tr>
  275. </thead>
  276. <tbody>
  277. <tr>
  278. <td class="name"><code>path</code></td>
  279. <td class="type">
  280. <span class="param-type">string</span>
  281. </td>
  282. <td class="attributes">
  283. </td>
  284. <td class="description last"><p>The path of the method to request</p></td>
  285. </tr>
  286. <tr>
  287. <td class="name"><code>serialize</code></td>
  288. <td class="type">
  289. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  290. </td>
  291. <td class="attributes">
  292. </td>
  293. <td class="description last"><p>The serialization function for
  294. inputs</p></td>
  295. </tr>
  296. <tr>
  297. <td class="name"><code>deserialize</code></td>
  298. <td class="type">
  299. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  300. </td>
  301. <td class="attributes">
  302. </td>
  303. <td class="description last"><p>The deserialization
  304. function for outputs</p></td>
  305. </tr>
  306. <tr>
  307. <td class="name"><code>metadata</code></td>
  308. <td class="type">
  309. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  310. </td>
  311. <td class="attributes">
  312. &lt;optional><br>
  313. </td>
  314. <td class="description last"><p>Array of metadata key/value pairs to add to
  315. the call</p></td>
  316. </tr>
  317. <tr>
  318. <td class="name"><code>options</code></td>
  319. <td class="type">
  320. <span class="param-type"><a href="grpc.Client.html#~CallOptions">grpc.Client~CallOptions</a></span>
  321. </td>
  322. <td class="attributes">
  323. &lt;optional><br>
  324. </td>
  325. <td class="description last"><p>Options map</p></td>
  326. </tr>
  327. <tr>
  328. <td class="name"><code>callback</code></td>
  329. <td class="type">
  330. <span class="param-type"><a href="grpc.Client.html#~requestCallback">grpc.Client~requestCallback</a></span>
  331. </td>
  332. <td class="attributes">
  333. </td>
  334. <td class="description last"><p>The callback for when the
  335. response is received</p></td>
  336. </tr>
  337. </tbody>
  338. </table>
  339. <dl class="details">
  340. </dl>
  341. <h5>Returns:</h5>
  342. <div class="param-desc">
  343. <p>An event emitter for stream related
  344. events</p>
  345. </div>
  346. <dl>
  347. <dt>
  348. Type
  349. </dt>
  350. <dd>
  351. <span class="param-type"><a href="grpc-ClientWritableStream.html">grpc~ClientWritableStream</a></span>
  352. </dd>
  353. </dl>
  354. </dd>
  355. <hr>
  356. <dt>
  357. <h4 class="name" id="makeServerStreamRequest"><span class="type-signature"></span>makeServerStreamRequest(path, serialize, deserialize, argument [, metadata] [, options])</h4>
  358. </dt>
  359. <dd>
  360. <div class="description">
  361. <p>Make a server stream request to the given method, with the given serialize
  362. and deserialize function, using the given argument</p>
  363. </div>
  364. <h5>Parameters:</h5>
  365. <table class="params table table-striped">
  366. <thead>
  367. <tr>
  368. <th>Name</th>
  369. <th>Type</th>
  370. <th>Argument</th>
  371. <th class="last">Description</th>
  372. </tr>
  373. </thead>
  374. <tbody>
  375. <tr>
  376. <td class="name"><code>path</code></td>
  377. <td class="type">
  378. <span class="param-type">string</span>
  379. </td>
  380. <td class="attributes">
  381. </td>
  382. <td class="description last"><p>The path of the method to request</p></td>
  383. </tr>
  384. <tr>
  385. <td class="name"><code>serialize</code></td>
  386. <td class="type">
  387. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  388. </td>
  389. <td class="attributes">
  390. </td>
  391. <td class="description last"><p>The serialization function for inputs</p></td>
  392. </tr>
  393. <tr>
  394. <td class="name"><code>deserialize</code></td>
  395. <td class="type">
  396. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  397. </td>
  398. <td class="attributes">
  399. </td>
  400. <td class="description last"><p>The deserialization
  401. function for outputs</p></td>
  402. </tr>
  403. <tr>
  404. <td class="name"><code>argument</code></td>
  405. <td class="type">
  406. <span class="param-type">*</span>
  407. </td>
  408. <td class="attributes">
  409. </td>
  410. <td class="description last"><p>The argument to the call. Should be serializable with
  411. serialize</p></td>
  412. </tr>
  413. <tr>
  414. <td class="name"><code>metadata</code></td>
  415. <td class="type">
  416. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  417. </td>
  418. <td class="attributes">
  419. &lt;optional><br>
  420. </td>
  421. <td class="description last"><p>Array of metadata key/value pairs to add to
  422. the call</p></td>
  423. </tr>
  424. <tr>
  425. <td class="name"><code>options</code></td>
  426. <td class="type">
  427. <span class="param-type"><a href="grpc.Client.html#~CallOptions">grpc.Client~CallOptions</a></span>
  428. </td>
  429. <td class="attributes">
  430. &lt;optional><br>
  431. </td>
  432. <td class="description last"><p>Options map</p></td>
  433. </tr>
  434. </tbody>
  435. </table>
  436. <dl class="details">
  437. </dl>
  438. <h5>Returns:</h5>
  439. <div class="param-desc">
  440. <p>An event emitter for stream related
  441. events</p>
  442. </div>
  443. <dl>
  444. <dt>
  445. Type
  446. </dt>
  447. <dd>
  448. <span class="param-type"><a href="grpc-ClientReadableStream.html">grpc~ClientReadableStream</a></span>
  449. </dd>
  450. </dl>
  451. </dd>
  452. <hr>
  453. <dt>
  454. <h4 class="name" id="makeUnaryRequest"><span class="type-signature"></span>makeUnaryRequest(path, serialize, deserialize, argument [, metadata] [, options], callback)</h4>
  455. </dt>
  456. <dd>
  457. <div class="description">
  458. <p>Make a unary request to the given method, using the given serialize
  459. and deserialize functions, with the given argument.</p>
  460. </div>
  461. <h5>Parameters:</h5>
  462. <table class="params table table-striped">
  463. <thead>
  464. <tr>
  465. <th>Name</th>
  466. <th>Type</th>
  467. <th>Argument</th>
  468. <th class="last">Description</th>
  469. </tr>
  470. </thead>
  471. <tbody>
  472. <tr>
  473. <td class="name"><code>path</code></td>
  474. <td class="type">
  475. <span class="param-type">string</span>
  476. </td>
  477. <td class="attributes">
  478. </td>
  479. <td class="description last"><p>The path of the method to request</p></td>
  480. </tr>
  481. <tr>
  482. <td class="name"><code>serialize</code></td>
  483. <td class="type">
  484. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  485. </td>
  486. <td class="attributes">
  487. </td>
  488. <td class="description last"><p>The serialization function for
  489. inputs</p></td>
  490. </tr>
  491. <tr>
  492. <td class="name"><code>deserialize</code></td>
  493. <td class="type">
  494. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  495. </td>
  496. <td class="attributes">
  497. </td>
  498. <td class="description last"><p>The deserialization
  499. function for outputs</p></td>
  500. </tr>
  501. <tr>
  502. <td class="name"><code>argument</code></td>
  503. <td class="type">
  504. <span class="param-type">*</span>
  505. </td>
  506. <td class="attributes">
  507. </td>
  508. <td class="description last"><p>The argument to the call. Should be serializable with
  509. serialize</p></td>
  510. </tr>
  511. <tr>
  512. <td class="name"><code>metadata</code></td>
  513. <td class="type">
  514. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  515. </td>
  516. <td class="attributes">
  517. &lt;optional><br>
  518. </td>
  519. <td class="description last"><p>Metadata to add to the call</p></td>
  520. </tr>
  521. <tr>
  522. <td class="name"><code>options</code></td>
  523. <td class="type">
  524. <span class="param-type"><a href="grpc.Client.html#~CallOptions">grpc.Client~CallOptions</a></span>
  525. </td>
  526. <td class="attributes">
  527. &lt;optional><br>
  528. </td>
  529. <td class="description last"><p>Options map</p></td>
  530. </tr>
  531. <tr>
  532. <td class="name"><code>callback</code></td>
  533. <td class="type">
  534. <span class="param-type"><a href="grpc.Client.html#~requestCallback">grpc.Client~requestCallback</a></span>
  535. </td>
  536. <td class="attributes">
  537. </td>
  538. <td class="description last"><p>The callback
  539. for when the response is received</p></td>
  540. </tr>
  541. </tbody>
  542. </table>
  543. <dl class="details">
  544. </dl>
  545. <h5>Returns:</h5>
  546. <div class="param-desc">
  547. <p>An event emitter for stream related events</p>
  548. </div>
  549. <dl>
  550. <dt>
  551. Type
  552. </dt>
  553. <dd>
  554. <span class="param-type"><a href="grpc-ClientUnaryCall.html">grpc~ClientUnaryCall</a></span>
  555. </dd>
  556. </dl>
  557. </dd>
  558. <hr>
  559. <dt>
  560. <h4 class="name" id="waitForReady"><span class="type-signature"></span>waitForReady(deadline, callback)</h4>
  561. </dt>
  562. <dd>
  563. <div class="description">
  564. <p>Wait for the client to be ready. The callback will be called when the
  565. client has successfully connected to the server, and it will be called
  566. with an error if the attempt to connect to the server has unrecoverablly
  567. failed or if the deadline expires. This function will make the channel
  568. start connecting if it has not already done so.</p>
  569. </div>
  570. <h5>Parameters:</h5>
  571. <table class="params table table-striped">
  572. <thead>
  573. <tr>
  574. <th>Name</th>
  575. <th>Type</th>
  576. <th class="last">Description</th>
  577. </tr>
  578. </thead>
  579. <tbody>
  580. <tr>
  581. <td class="name"><code>deadline</code></td>
  582. <td class="type">
  583. <span class="param-type"><a href="grpc.html#~Deadline">grpc~Deadline</a></span>
  584. </td>
  585. <td class="description last"><p>When to stop waiting for a connection.</p></td>
  586. </tr>
  587. <tr>
  588. <td class="name"><code>callback</code></td>
  589. <td class="type">
  590. <span class="param-type">function</span>
  591. </td>
  592. <td class="description last"><p>The callback to call when done attempting
  593. to connect.</p></td>
  594. </tr>
  595. </tbody>
  596. </table>
  597. <dl class="details">
  598. </dl>
  599. </dd>
  600. </dl>
  601. <h3 class="subsection-title">Type Definitions</h3>
  602. <dl>
  603. <hr>
  604. <dt class="name" id="~Call">
  605. <h4 id="~Call">Call</h4>
  606. </dt>
  607. <dd>
  608. <div class="description">
  609. <p>Any client call type</p>
  610. </div>
  611. <h5>Type:</h5>
  612. <ul>
  613. <li>
  614. <span class="param-type"><a href="grpc-ClientUnaryCall.html">grpc~ClientUnaryCall</a></span>
  615. |
  616. <span class="param-type"><a href="grpc-ClientReadableStream.html">grpc~ClientReadableStream</a></span>
  617. |
  618. <span class="param-type"><a href="grpc-ClientWritableStream.html">grpc~ClientWritableStream</a></span>
  619. |
  620. <span class="param-type"><a href="grpc-ClientDuplexStream.html">grpc~ClientDuplexStream</a></span>
  621. </li>
  622. </ul>
  623. <dl class="details">
  624. </dl>
  625. </dd>
  626. <hr>
  627. <dt class="name" id="~CallOptions">
  628. <h4 id="~CallOptions">CallOptions</h4>
  629. </dt>
  630. <dd>
  631. <div class="description">
  632. <p>Options that can be set on a call.</p>
  633. </div>
  634. <h5>Type:</h5>
  635. <ul>
  636. <li>
  637. <span class="param-type">Object</span>
  638. </li>
  639. </ul>
  640. <dl class="details">
  641. <h5 class="subsection-title">Properties:</h5>
  642. <dl>
  643. <table class="props table table-striped">
  644. <thead>
  645. <tr>
  646. <th>Name</th>
  647. <th>Type</th>
  648. <th class="last">Description</th>
  649. </tr>
  650. </thead>
  651. <tbody>
  652. <tr>
  653. <td class="name"><code>deadline</code></td>
  654. <td class="type">
  655. <span class="param-type"><a href="grpc.html#~Deadline">grpc~Deadline</a></span>
  656. </td>
  657. <td class="description last"><p>The deadline for the entire call to
  658. complete.</p></td>
  659. </tr>
  660. <tr>
  661. <td class="name"><code>host</code></td>
  662. <td class="type">
  663. <span class="param-type">string</span>
  664. </td>
  665. <td class="description last"><p>Server hostname to set on the call. Only meaningful
  666. if different from the server address used to construct the client.</p></td>
  667. </tr>
  668. <tr>
  669. <td class="name"><code>parent</code></td>
  670. <td class="type">
  671. <span class="param-type"><a href="grpc.Client.html#~Call">grpc.Client~Call</a></span>
  672. </td>
  673. <td class="description last"><p>Parent call. Used in servers when
  674. making a call as part of the process of handling a call. Used to
  675. propagate some information automatically, as specified by
  676. propagate_flags.</p></td>
  677. </tr>
  678. <tr>
  679. <td class="name"><code>propagate_flags</code></td>
  680. <td class="type">
  681. <span class="param-type">number</span>
  682. </td>
  683. <td class="description last"><p>Indicates which properties of a parent
  684. call should propagate to this call. Bitwise combination of flags in
  685. <a href="grpc.html#.propagate">grpc.propagate</a>.</p></td>
  686. </tr>
  687. <tr>
  688. <td class="name"><code>credentials</code></td>
  689. <td class="type">
  690. <span class="param-type"><a href="grpc.credentials-CallCredentials.html">grpc.credentials~CallCredentials</a></span>
  691. </td>
  692. <td class="description last"><p>The credentials that
  693. should be used to make this particular call.</p></td>
  694. </tr>
  695. </tbody>
  696. </table>
  697. </dl>
  698. </dl>
  699. </dd>
  700. <hr>
  701. <dt>
  702. <h4 class="name" id="~requestCallback"><span class="type-signature"></span>requestCallback(error, value)</h4>
  703. </dt>
  704. <dd>
  705. <h5>Parameters:</h5>
  706. <table class="params table table-striped">
  707. <thead>
  708. <tr>
  709. <th>Name</th>
  710. <th>Type</th>
  711. <th>Argument</th>
  712. <th class="last">Description</th>
  713. </tr>
  714. </thead>
  715. <tbody>
  716. <tr>
  717. <td class="name"><code>error</code></td>
  718. <td class="type">
  719. <span class="param-type"><a href="grpc.html#~ServiceError">grpc~ServiceError</a></span>
  720. </td>
  721. <td class="attributes">
  722. &lt;nullable><br>
  723. </td>
  724. <td class="description last"><p>The error, if the call
  725. failed</p></td>
  726. </tr>
  727. <tr>
  728. <td class="name"><code>value</code></td>
  729. <td class="type">
  730. <span class="param-type">*</span>
  731. </td>
  732. <td class="attributes">
  733. </td>
  734. <td class="description last"><p>The response value, if the call succeeded</p></td>
  735. </tr>
  736. </tbody>
  737. </table>
  738. <dl class="details">
  739. </dl>
  740. </dd>
  741. </dl>
  742. </article>
  743. </section>
  744. </div>
  745. </div>
  746. <div class="clearfix"></div>
  747. <div class="col-md-3">
  748. <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
  749. </div>
  750. </div>
  751. </div>
  752. <div class="modal fade" id="searchResults">
  753. <div class="modal-dialog">
  754. <div class="modal-content">
  755. <div class="modal-header">
  756. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  757. <h4 class="modal-title">Search results</h4>
  758. </div>
  759. <div class="modal-body"></div>
  760. <div class="modal-footer">
  761. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  762. </div>
  763. </div><!-- /.modal-content -->
  764. </div><!-- /.modal-dialog -->
  765. </div>
  766. <footer>
  767. <span class="jsdoc-message">
  768. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
  769. on 2018-11-29T11:16:28-08:00
  770. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
  771. </span>
  772. </footer>
  773. <script src="scripts/docstrap.lib.js"></script>
  774. <script src="scripts/toc.js"></script>
  775. <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
  776. <script>
  777. $( function () {
  778. $( "[id*='$']" ).each( function () {
  779. var $this = $( this );
  780. $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
  781. } );
  782. $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
  783. var $this = $( this );
  784. var example = $this.find( "code" );
  785. exampleText = example.html();
  786. var lang = /{@lang (.*?)}/.exec( exampleText );
  787. if ( lang && lang[1] ) {
  788. exampleText = exampleText.replace( lang[0], "" );
  789. example.html( exampleText );
  790. lang = lang[1];
  791. } else {
  792. var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
  793. lang = langClassMatch ? langClassMatch[1] : "javascript";
  794. }
  795. if ( lang ) {
  796. $this
  797. .addClass( "sunlight-highlight-" + lang )
  798. .addClass( "linenums" )
  799. .html( example.html() );
  800. }
  801. } );
  802. Sunlight.highlightAll( {
  803. lineNumbers : false,
  804. showMenu : true,
  805. enableDoclinks : true
  806. } );
  807. $.catchAnchorLinks( {
  808. navbarOffset: 10
  809. } );
  810. $( "#toc" ).toc( {
  811. anchorName : function ( i, heading, prefix ) {
  812. return $( heading ).attr( "id" ) || ( prefix + i );
  813. },
  814. selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
  815. showAndHide : false,
  816. smoothScrolling: true
  817. } );
  818. $( "#main span[id^='toc']" ).addClass( "toc-shim" );
  819. $( '.dropdown-toggle' ).dropdown();
  820. $( "table" ).each( function () {
  821. var $this = $( this );
  822. $this.addClass('table');
  823. } );
  824. } );
  825. </script>
  826. <!--Navigation and Symbol Display-->
  827. <!--Google Analytics-->
  828. <script type="text/javascript">
  829. $(document).ready(function() {
  830. SearcherDisplay.init();
  831. });
  832. </script>
  833. </body>
  834. </html>