grpc.html 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Namespace: grpc</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">Namespace: grpc</h1>
  17. <section>
  18. <header>
  19. <h2>grpc</h2>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <dl class="details">
  24. <dt class="tag-source">Source:</dt>
  25. <dd class="tag-source"><ul class="dummy"><li>
  26. <a href="index.js.html">index.js</a>, <a href="index.js.html#line47">line 47</a>
  27. </li></ul></dd>
  28. </dl>
  29. </div>
  30. <h3 class="subsection-title">Classes</h3>
  31. <dl>
  32. <dt><a href="grpc.Client.html">Client</a></dt>
  33. <dd></dd>
  34. <dt><a href="grpc.Metadata.html">Metadata</a></dt>
  35. <dd></dd>
  36. <dt><a href="grpc.Server.html">Server</a></dt>
  37. <dd></dd>
  38. <dt><a href="grpc.ServerCredentials.html">ServerCredentials</a></dt>
  39. <dd></dd>
  40. <dt><a href="grpc-ClientDuplexStream.html">ClientDuplexStream</a></dt>
  41. <dd></dd>
  42. <dt><a href="grpc-ClientReadableStream.html">ClientReadableStream</a></dt>
  43. <dd></dd>
  44. <dt><a href="grpc-ClientUnaryCall.html">ClientUnaryCall</a></dt>
  45. <dd></dd>
  46. <dt><a href="grpc-ClientWritableStream.html">ClientWritableStream</a></dt>
  47. <dd></dd>
  48. <dt><a href="grpc-ServerDuplexStream.html">ServerDuplexStream</a></dt>
  49. <dd></dd>
  50. <dt><a href="grpc-ServerReadableStream.html">ServerReadableStream</a></dt>
  51. <dd></dd>
  52. <dt><a href="grpc-ServerUnaryCall.html">ServerUnaryCall</a></dt>
  53. <dd></dd>
  54. <dt><a href="grpc-ServerWritableStream.html">ServerWritableStream</a></dt>
  55. <dd></dd>
  56. </dl>
  57. <h3 class="subsection-title">Namespaces</h3>
  58. <dl>
  59. <dt><a href="grpc.credentials.html">credentials</a></dt>
  60. <dd></dd>
  61. </dl>
  62. <h3 class="subsection-title">Members</h3>
  63. <h4 class="name" id=".callError"><span class="type-signature">(static, constant) </span>callError<span class="type-signature"> :number</span></h4>
  64. <div class="description">
  65. <p>Call error constants. Call errors almost always indicate bugs in the gRPC
  66. library, and these error codes are mainly useful for finding those bugs.</p>
  67. </div>
  68. <h5>Type:</h5>
  69. <ul>
  70. <li>
  71. <span class="param-type">number</span>
  72. </li>
  73. </ul>
  74. <h5 class="subsection-title">Properties:</h5>
  75. <table class="props">
  76. <thead>
  77. <tr>
  78. <th>Name</th>
  79. <th>Type</th>
  80. <th class="last">Description</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <tr>
  85. <td class="name"><code>OK</code></td>
  86. <td class="type">
  87. <span class="param-type">number</span>
  88. </td>
  89. <td class="description last"></td>
  90. </tr>
  91. <tr>
  92. <td class="name"><code>ERROR</code></td>
  93. <td class="type">
  94. <span class="param-type">number</span>
  95. </td>
  96. <td class="description last"></td>
  97. </tr>
  98. <tr>
  99. <td class="name"><code>NOT_ON_SERVER</code></td>
  100. <td class="type">
  101. <span class="param-type">number</span>
  102. </td>
  103. <td class="description last"></td>
  104. </tr>
  105. <tr>
  106. <td class="name"><code>NOT_ON_CLIENT</code></td>
  107. <td class="type">
  108. <span class="param-type">number</span>
  109. </td>
  110. <td class="description last"></td>
  111. </tr>
  112. <tr>
  113. <td class="name"><code>ALREADY_INVOKED</code></td>
  114. <td class="type">
  115. <span class="param-type">number</span>
  116. </td>
  117. <td class="description last"></td>
  118. </tr>
  119. <tr>
  120. <td class="name"><code>NOT_INVOKED</code></td>
  121. <td class="type">
  122. <span class="param-type">number</span>
  123. </td>
  124. <td class="description last"></td>
  125. </tr>
  126. <tr>
  127. <td class="name"><code>ALREADY_FINISHED</code></td>
  128. <td class="type">
  129. <span class="param-type">number</span>
  130. </td>
  131. <td class="description last"></td>
  132. </tr>
  133. <tr>
  134. <td class="name"><code>TOO_MANY_OPERATIONS</code></td>
  135. <td class="type">
  136. <span class="param-type">number</span>
  137. </td>
  138. <td class="description last"></td>
  139. </tr>
  140. <tr>
  141. <td class="name"><code>INVALID_FLAGS</code></td>
  142. <td class="type">
  143. <span class="param-type">number</span>
  144. </td>
  145. <td class="description last"></td>
  146. </tr>
  147. <tr>
  148. <td class="name"><code>INVALID_METADATA</code></td>
  149. <td class="type">
  150. <span class="param-type">number</span>
  151. </td>
  152. <td class="description last"></td>
  153. </tr>
  154. <tr>
  155. <td class="name"><code>INVALID_MESSAGE</code></td>
  156. <td class="type">
  157. <span class="param-type">number</span>
  158. </td>
  159. <td class="description last"></td>
  160. </tr>
  161. <tr>
  162. <td class="name"><code>NOT_SERVER_COMPLETION_QUEUE</code></td>
  163. <td class="type">
  164. <span class="param-type">number</span>
  165. </td>
  166. <td class="description last"></td>
  167. </tr>
  168. <tr>
  169. <td class="name"><code>BATCH_TOO_BIG</code></td>
  170. <td class="type">
  171. <span class="param-type">number</span>
  172. </td>
  173. <td class="description last"></td>
  174. </tr>
  175. <tr>
  176. <td class="name"><code>PAYLOAD_TYPE_MISMATCH</code></td>
  177. <td class="type">
  178. <span class="param-type">number</span>
  179. </td>
  180. <td class="description last"></td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. <dl class="details">
  185. <dt class="tag-source">Source:</dt>
  186. <dd class="tag-source"><ul class="dummy"><li>
  187. <a href="src_constants.js.html">src/constants.js</a>, <a href="src_constants.js.html#line186">line 186</a>
  188. </li></ul></dd>
  189. </dl>
  190. <h4 class="name" id=".logVerbosity"><span class="type-signature">(static, readonly) </span>logVerbosity<span class="type-signature"> :number</span></h4>
  191. <h5>Type:</h5>
  192. <ul>
  193. <li>
  194. <span class="param-type">number</span>
  195. </li>
  196. </ul>
  197. <h5 class="subsection-title">Properties:</h5>
  198. <table class="props">
  199. <thead>
  200. <tr>
  201. <th>Name</th>
  202. <th>Type</th>
  203. <th class="last">Description</th>
  204. </tr>
  205. </thead>
  206. <tbody>
  207. <tr>
  208. <td class="name"><code>DEBUG</code></td>
  209. <td class="type">
  210. <span class="param-type">number</span>
  211. </td>
  212. <td class="description last"></td>
  213. </tr>
  214. <tr>
  215. <td class="name"><code>INFO</code></td>
  216. <td class="type">
  217. <span class="param-type">number</span>
  218. </td>
  219. <td class="description last"></td>
  220. </tr>
  221. <tr>
  222. <td class="name"><code>ERROR</code></td>
  223. <td class="type">
  224. <span class="param-type">number</span>
  225. </td>
  226. <td class="description last"></td>
  227. </tr>
  228. </tbody>
  229. </table>
  230. <dl class="details">
  231. <dt class="tag-source">Source:</dt>
  232. <dd class="tag-source"><ul class="dummy"><li>
  233. <a href="src_constants.js.html">src/constants.js</a>, <a href="src_constants.js.html#line232">line 232</a>
  234. </li></ul></dd>
  235. </dl>
  236. <h4 class="name" id=".propagate"><span class="type-signature">(static) </span>propagate<span class="type-signature"> :number</span></h4>
  237. <div class="description">
  238. <p>Propagation flags: these can be bitwise or-ed to form the propagation option
  239. for calls.</p>
  240. <p>Users are encouraged to write propagation masks as deltas from the default.
  241. i.e. write <code>grpc.propagate.DEFAULTS &amp; ~grpc.propagate.DEADLINE</code> to disable
  242. deadline propagation.</p>
  243. </div>
  244. <h5>Type:</h5>
  245. <ul>
  246. <li>
  247. <span class="param-type">number</span>
  248. </li>
  249. </ul>
  250. <h5 class="subsection-title">Properties:</h5>
  251. <table class="props">
  252. <thead>
  253. <tr>
  254. <th>Name</th>
  255. <th>Type</th>
  256. <th class="last">Description</th>
  257. </tr>
  258. </thead>
  259. <tbody>
  260. <tr>
  261. <td class="name"><code>DEADLINE</code></td>
  262. <td class="type">
  263. <span class="param-type">number</span>
  264. </td>
  265. <td class="description last"></td>
  266. </tr>
  267. <tr>
  268. <td class="name"><code>CENSUS_STATS_CONTEXT</code></td>
  269. <td class="type">
  270. <span class="param-type">number</span>
  271. </td>
  272. <td class="description last"></td>
  273. </tr>
  274. <tr>
  275. <td class="name"><code>CENSUS_TRACING_CONTEXT</code></td>
  276. <td class="type">
  277. <span class="param-type">number</span>
  278. </td>
  279. <td class="description last"></td>
  280. </tr>
  281. <tr>
  282. <td class="name"><code>CANCELLATION</code></td>
  283. <td class="type">
  284. <span class="param-type">number</span>
  285. </td>
  286. <td class="description last"></td>
  287. </tr>
  288. <tr>
  289. <td class="name"><code>DEFAULTS</code></td>
  290. <td class="type">
  291. <span class="param-type">number</span>
  292. </td>
  293. <td class="description last"></td>
  294. </tr>
  295. </tbody>
  296. </table>
  297. <dl class="details">
  298. <dt class="tag-source">Source:</dt>
  299. <dd class="tag-source"><ul class="dummy"><li>
  300. <a href="src_constants.js.html">src/constants.js</a>, <a href="src_constants.js.html#line168">line 168</a>
  301. </li></ul></dd>
  302. </dl>
  303. <h4 class="name" id=".status"><span class="type-signature">(static, readonly) </span>status<span class="type-signature"> :number</span></h4>
  304. <div class="description">
  305. <p>Enum of status codes that gRPC can return</p>
  306. </div>
  307. <h5>Type:</h5>
  308. <ul>
  309. <li>
  310. <span class="param-type">number</span>
  311. </li>
  312. </ul>
  313. <h5 class="subsection-title">Properties:</h5>
  314. <table class="props">
  315. <thead>
  316. <tr>
  317. <th>Name</th>
  318. <th>Type</th>
  319. <th class="last">Description</th>
  320. </tr>
  321. </thead>
  322. <tbody>
  323. <tr>
  324. <td class="name"><code>OK</code></td>
  325. <td class="type">
  326. <span class="param-type">number</span>
  327. </td>
  328. <td class="description last"><p>Not an error; returned on success</p></td>
  329. </tr>
  330. <tr>
  331. <td class="name"><code>CANCELLED</code></td>
  332. <td class="type">
  333. <span class="param-type">number</span>
  334. </td>
  335. <td class="description last"><p>The operation was cancelled (typically by the caller).</p></td>
  336. </tr>
  337. <tr>
  338. <td class="name"><code>UNKNOWN</code></td>
  339. <td class="type">
  340. <span class="param-type">number</span>
  341. </td>
  342. <td class="description last"><p>Unknown error. An example of where this error may be returned is
  343. if a status value received from another address space belongs to
  344. an error-space that is not known in this address space. Also
  345. errors raised by APIs that do not return enough error information
  346. may be converted to this error.</p></td>
  347. </tr>
  348. <tr>
  349. <td class="name"><code>INVALID_ARGUMENT</code></td>
  350. <td class="type">
  351. <span class="param-type">number</span>
  352. </td>
  353. <td class="description last"><p>Client specified an invalid argument. Note that this differs
  354. from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
  355. that are problematic regardless of the state of the system
  356. (e.g., a malformed file name).</p></td>
  357. </tr>
  358. <tr>
  359. <td class="name"><code>DEADLINE_EXCEEDED</code></td>
  360. <td class="type">
  361. <span class="param-type">number</span>
  362. </td>
  363. <td class="description last"><p>Deadline expired before operation could complete. For operations
  364. that change the state of the system, this error may be returned
  365. even if the operation has completed successfully. For example, a
  366. successful response from a server could have been delayed long
  367. enough for the deadline to expire.</p></td>
  368. </tr>
  369. <tr>
  370. <td class="name"><code>NOT_FOUND</code></td>
  371. <td class="type">
  372. <span class="param-type">number</span>
  373. </td>
  374. <td class="description last"><p>Some requested entity (e.g., file or directory) was not found.</p></td>
  375. </tr>
  376. <tr>
  377. <td class="name"><code>ALREADY_EXISTS</code></td>
  378. <td class="type">
  379. <span class="param-type">number</span>
  380. </td>
  381. <td class="description last"><p>Some entity that we attempted to create (e.g., file or directory)
  382. already exists.</p></td>
  383. </tr>
  384. <tr>
  385. <td class="name"><code>PERMISSION_DENIED</code></td>
  386. <td class="type">
  387. <span class="param-type">number</span>
  388. </td>
  389. <td class="description last"><p>The caller does not have permission to execute the specified
  390. operation. PERMISSION_DENIED must not be used for rejections
  391. caused by exhausting some resource (use RESOURCE_EXHAUSTED
  392. instead for those errors). PERMISSION_DENIED must not be
  393. used if the caller can not be identified (use UNAUTHENTICATED
  394. instead for those errors).</p></td>
  395. </tr>
  396. <tr>
  397. <td class="name"><code>RESOURCE_EXHAUSTED</code></td>
  398. <td class="type">
  399. <span class="param-type">number</span>
  400. </td>
  401. <td class="description last"><p>Some resource has been exhausted, perhaps a per-user quota, or
  402. perhaps the entire file system is out of space.</p></td>
  403. </tr>
  404. <tr>
  405. <td class="name"><code>FAILED_PRECONDITION</code></td>
  406. <td class="type">
  407. <span class="param-type">number</span>
  408. </td>
  409. <td class="description last"><p>Operation was rejected because the system is not in a state
  410. required for the operation's execution. For example, directory
  411. to be deleted may be non-empty, an rmdir operation is applied to
  412. a non-directory, etc.</p>
  413. <p>A litmus test that may help a service implementor in deciding
  414. between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:</p>
  415. <ul>
  416. <li>Use UNAVAILABLE if the client can retry just the failing call.</li>
  417. <li>Use ABORTED if the client should retry at a higher-level
  418. (e.g., restarting a read-modify-write sequence).</li>
  419. <li>Use FAILED_PRECONDITION if the client should not retry until
  420. the system state has been explicitly fixed. E.g., if an &quot;rmdir&quot;
  421. fails because the directory is non-empty, FAILED_PRECONDITION
  422. should be returned since the client should not retry unless
  423. they have first fixed up the directory by deleting files from it.</li>
  424. <li>Use FAILED_PRECONDITION if the client performs conditional
  425. REST Get/Update/Delete on a resource and the resource on the
  426. server does not match the condition. E.g., conflicting
  427. read-modify-write on the same resource.</li>
  428. </ul></td>
  429. </tr>
  430. <tr>
  431. <td class="name"><code>ABORTED</code></td>
  432. <td class="type">
  433. <span class="param-type">number</span>
  434. </td>
  435. <td class="description last"><p>The operation was aborted, typically due to a concurrency issue
  436. like sequencer check failures, transaction aborts, etc.</p>
  437. <p>See litmus test above for deciding between FAILED_PRECONDITION,
  438. ABORTED, and UNAVAILABLE.</p></td>
  439. </tr>
  440. <tr>
  441. <td class="name"><code>OUT_OF_RANGE</code></td>
  442. <td class="type">
  443. <span class="param-type">number</span>
  444. </td>
  445. <td class="description last"><p>Operation was attempted past the valid range. E.g., seeking or
  446. reading past end of file.</p>
  447. <p>Unlike INVALID_ARGUMENT, this error indicates a problem that may
  448. be fixed if the system state changes. For example, a 32-bit file
  449. system will generate INVALID_ARGUMENT if asked to read at an
  450. offset that is not in the range [0,2^32-1], but it will generate
  451. OUT_OF_RANGE if asked to read from an offset past the current
  452. file size.</p>
  453. <p>There is a fair bit of overlap between FAILED_PRECONDITION and
  454. OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific
  455. error) when it applies so that callers who are iterating through
  456. a space can easily look for an OUT_OF_RANGE error to detect when
  457. they are done.</p></td>
  458. </tr>
  459. <tr>
  460. <td class="name"><code>UNIMPLEMENTED</code></td>
  461. <td class="type">
  462. <span class="param-type">number</span>
  463. </td>
  464. <td class="description last"><p>Operation is not implemented or not supported/enabled in this service.</p></td>
  465. </tr>
  466. <tr>
  467. <td class="name"><code>INTERNAL</code></td>
  468. <td class="type">
  469. <span class="param-type">number</span>
  470. </td>
  471. <td class="description last"><p>Internal errors. Means some invariants expected by underlying
  472. system has been broken. If you see one of these errors,
  473. something is very broken.</p></td>
  474. </tr>
  475. <tr>
  476. <td class="name"><code>UNAVAILABLE</code></td>
  477. <td class="type">
  478. <span class="param-type">number</span>
  479. </td>
  480. <td class="description last"><p>The service is currently unavailable. This is a most likely a
  481. transient condition and may be corrected by retrying with
  482. a backoff.</p>
  483. <p>See litmus test above for deciding between FAILED_PRECONDITION,
  484. ABORTED, and UNAVAILABLE.</p></td>
  485. </tr>
  486. <tr>
  487. <td class="name"><code>DATA_LOSS</code></td>
  488. <td class="type">
  489. <span class="param-type">number</span>
  490. </td>
  491. <td class="description last"><p>Unrecoverable data loss or corruption.</p></td>
  492. </tr>
  493. <tr>
  494. <td class="name"><code>UNAUTHENTICATED</code></td>
  495. <td class="type">
  496. <span class="param-type">number</span>
  497. </td>
  498. <td class="description last"><p>The request does not have valid authentication credentials for the
  499. operation.</p></td>
  500. </tr>
  501. </tbody>
  502. </table>
  503. <dl class="details">
  504. <dt class="tag-source">Source:</dt>
  505. <dd class="tag-source"><ul class="dummy"><li>
  506. <a href="src_constants.js.html">src/constants.js</a>, <a href="src_constants.js.html#line30">line 30</a>
  507. </li></ul></dd>
  508. </dl>
  509. <h4 class="name" id=".writeFlags"><span class="type-signature">(static, readonly) </span>writeFlags<span class="type-signature"> :number</span></h4>
  510. <div class="description">
  511. <p>Write flags: these can be bitwise or-ed to form write options that modify
  512. how data is written.</p>
  513. </div>
  514. <h5>Type:</h5>
  515. <ul>
  516. <li>
  517. <span class="param-type">number</span>
  518. </li>
  519. </ul>
  520. <h5 class="subsection-title">Properties:</h5>
  521. <table class="props">
  522. <thead>
  523. <tr>
  524. <th>Name</th>
  525. <th>Type</th>
  526. <th class="last">Description</th>
  527. </tr>
  528. </thead>
  529. <tbody>
  530. <tr>
  531. <td class="name"><code>BUFFER_HINT</code></td>
  532. <td class="type">
  533. <span class="param-type">number</span>
  534. </td>
  535. <td class="description last"><p>Hint that the write may be buffered and need not go out on the wire
  536. immediately. GRPC is free to buffer the message until the next non-buffered
  537. write, or until writes_done, but it need not buffer completely or at all.</p></td>
  538. </tr>
  539. <tr>
  540. <td class="name"><code>NO_COMPRESS</code></td>
  541. <td class="type">
  542. <span class="param-type">number</span>
  543. </td>
  544. <td class="description last"><p>Force compression to be disabled for a particular write</p></td>
  545. </tr>
  546. </tbody>
  547. </table>
  548. <dl class="details">
  549. <dt class="tag-source">Source:</dt>
  550. <dd class="tag-source"><ul class="dummy"><li>
  551. <a href="src_constants.js.html">src/constants.js</a>, <a href="src_constants.js.html#line213">line 213</a>
  552. </li></ul></dd>
  553. </dl>
  554. <h4 class="name" id="~defaultLoadOptions"><span class="type-signature">(inner) </span>defaultLoadOptions<span class="type-signature"></span></h4>
  555. <div class="description">
  556. <p>Default options for loading proto files into gRPC</p>
  557. </div>
  558. <dl class="details">
  559. <dt class="tag-source">Source:</dt>
  560. <dd class="tag-source"><ul class="dummy"><li>
  561. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line70">line 70</a>
  562. </li></ul></dd>
  563. </dl>
  564. <h3 class="subsection-title">Methods</h3>
  565. <h4 class="name" id=".closeClient"><span class="type-signature">(static) </span>closeClient<span class="signature">(client_obj)</span><span class="type-signature"></span></h4>
  566. <h5>Parameters:</h5>
  567. <table class="params">
  568. <thead>
  569. <tr>
  570. <th>Name</th>
  571. <th>Type</th>
  572. <th class="last">Description</th>
  573. </tr>
  574. </thead>
  575. <tbody>
  576. <tr>
  577. <td class="name"><code>client_obj</code></td>
  578. <td class="type">
  579. <span class="param-type"><a href="grpc.Client.html">grpc.Client</a></span>
  580. </td>
  581. <td class="description last"><p>The client to close</p></td>
  582. </tr>
  583. </tbody>
  584. </table>
  585. <dl class="details">
  586. <dt class="tag-source">Source:</dt>
  587. <dd class="tag-source"><ul class="dummy"><li>
  588. <a href="index.js.html">index.js</a>, <a href="index.js.html#line251">line 251</a>
  589. </li></ul></dd>
  590. </dl>
  591. <h4 class="name" id=".load"><span class="type-signature">(static) </span>load<span class="signature">(filename, format<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
  592. <div class="description">
  593. <p>Load a gRPC object from a .proto file.</p>
  594. </div>
  595. <h5>Parameters:</h5>
  596. <table class="params">
  597. <thead>
  598. <tr>
  599. <th>Name</th>
  600. <th>Type</th>
  601. <th>Attributes</th>
  602. <th class="last">Description</th>
  603. </tr>
  604. </thead>
  605. <tbody>
  606. <tr>
  607. <td class="name"><code>filename</code></td>
  608. <td class="type">
  609. <span class="param-type">string</span>
  610. |
  611. <span class="param-type">Object</span>
  612. </td>
  613. <td class="attributes">
  614. </td>
  615. <td class="description last"><p>The file to load</p></td>
  616. </tr>
  617. <tr>
  618. <td class="name"><code>format</code></td>
  619. <td class="type">
  620. <span class="param-type">string</span>
  621. </td>
  622. <td class="attributes">
  623. &lt;optional><br>
  624. </td>
  625. <td class="description last"><p>The file format to expect. Must be either 'proto' or
  626. 'json'. Defaults to 'proto'</p></td>
  627. </tr>
  628. <tr>
  629. <td class="name"><code>options</code></td>
  630. <td class="type">
  631. <span class="param-type">Object</span>
  632. </td>
  633. <td class="attributes">
  634. &lt;optional><br>
  635. </td>
  636. <td class="description last"><p>Options to apply to the loaded file</p>
  637. <h6>Properties</h6>
  638. <table class="params">
  639. <thead>
  640. <tr>
  641. <th>Name</th>
  642. <th>Type</th>
  643. <th>Attributes</th>
  644. <th>Default</th>
  645. <th class="last">Description</th>
  646. </tr>
  647. </thead>
  648. <tbody>
  649. <tr>
  650. <td class="name"><code>convertFieldsToCamelCase</code></td>
  651. <td class="type">
  652. <span class="param-type">bool</span>
  653. </td>
  654. <td class="attributes">
  655. &lt;optional><br>
  656. </td>
  657. <td class="default">
  658. false
  659. </td>
  660. <td class="description last"><p>Load this file with
  661. field names in camel case instead of their original case</p></td>
  662. </tr>
  663. <tr>
  664. <td class="name"><code>binaryAsBase64</code></td>
  665. <td class="type">
  666. <span class="param-type">bool</span>
  667. </td>
  668. <td class="attributes">
  669. &lt;optional><br>
  670. </td>
  671. <td class="default">
  672. false
  673. </td>
  674. <td class="description last"><p>deserialize bytes values as
  675. base64 strings instead of Buffers</p></td>
  676. </tr>
  677. <tr>
  678. <td class="name"><code>longsAsStrings</code></td>
  679. <td class="type">
  680. <span class="param-type">bool</span>
  681. </td>
  682. <td class="attributes">
  683. &lt;optional><br>
  684. </td>
  685. <td class="default">
  686. true
  687. </td>
  688. <td class="description last"><p>deserialize long values as
  689. strings instead of objects</p></td>
  690. </tr>
  691. <tr>
  692. <td class="name"><code>deprecatedArgumentOrder</code></td>
  693. <td class="type">
  694. <span class="param-type">bool</span>
  695. </td>
  696. <td class="attributes">
  697. &lt;optional><br>
  698. </td>
  699. <td class="default">
  700. false
  701. </td>
  702. <td class="description last"><p>use the beta method
  703. argument order for client methods, with optional arguments after the
  704. callback. This option is only a temporary stopgap measure to smooth an
  705. API breakage. It is deprecated, and new code should not use it.</p></td>
  706. </tr>
  707. </tbody>
  708. </table>
  709. </td>
  710. </tr>
  711. </tbody>
  712. </table>
  713. <dl class="details">
  714. <dt class="tag-source">Source:</dt>
  715. <dd class="tag-source"><ul class="dummy"><li>
  716. <a href="index.js.html">index.js</a>, <a href="index.js.html#line121">line 121</a>
  717. </li></ul></dd>
  718. </dl>
  719. <h5>Returns:</h5>
  720. <div class="param-desc">
  721. <p>The resulting gRPC object</p>
  722. </div>
  723. <dl>
  724. <dt>
  725. Type
  726. </dt>
  727. <dd>
  728. <span class="param-type">Object.&lt;string, *></span>
  729. </dd>
  730. </dl>
  731. <h4 class="name" id=".loadObject"><span class="type-signature">(static) </span>loadObject<span class="signature">(value, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
  732. <div class="description">
  733. <p>Load a ProtoBuf.js object as a gRPC object.</p>
  734. </div>
  735. <h5>Parameters:</h5>
  736. <table class="params">
  737. <thead>
  738. <tr>
  739. <th>Name</th>
  740. <th>Type</th>
  741. <th>Attributes</th>
  742. <th class="last">Description</th>
  743. </tr>
  744. </thead>
  745. <tbody>
  746. <tr>
  747. <td class="name"><code>value</code></td>
  748. <td class="type">
  749. <span class="param-type">Object</span>
  750. </td>
  751. <td class="attributes">
  752. </td>
  753. <td class="description last"><p>The ProtoBuf.js reflection object to load</p></td>
  754. </tr>
  755. <tr>
  756. <td class="name"><code>options</code></td>
  757. <td class="type">
  758. <span class="param-type">Object</span>
  759. </td>
  760. <td class="attributes">
  761. &lt;optional><br>
  762. </td>
  763. <td class="description last"><p>Options to apply to the loaded file</p>
  764. <h6>Properties</h6>
  765. <table class="params">
  766. <thead>
  767. <tr>
  768. <th>Name</th>
  769. <th>Type</th>
  770. <th>Attributes</th>
  771. <th>Default</th>
  772. <th class="last">Description</th>
  773. </tr>
  774. </thead>
  775. <tbody>
  776. <tr>
  777. <td class="name"><code>binaryAsBase64</code></td>
  778. <td class="type">
  779. <span class="param-type">bool</span>
  780. </td>
  781. <td class="attributes">
  782. &lt;optional><br>
  783. </td>
  784. <td class="default">
  785. false
  786. </td>
  787. <td class="description last"><p>deserialize bytes values as
  788. base64 strings instead of Buffers</p></td>
  789. </tr>
  790. <tr>
  791. <td class="name"><code>longsAsStrings</code></td>
  792. <td class="type">
  793. <span class="param-type">bool</span>
  794. </td>
  795. <td class="attributes">
  796. &lt;optional><br>
  797. </td>
  798. <td class="default">
  799. true
  800. </td>
  801. <td class="description last"><p>deserialize long values as
  802. strings instead of objects</p></td>
  803. </tr>
  804. <tr>
  805. <td class="name"><code>enumsAsStrings</code></td>
  806. <td class="type">
  807. <span class="param-type">bool</span>
  808. </td>
  809. <td class="attributes">
  810. &lt;optional><br>
  811. </td>
  812. <td class="default">
  813. true
  814. </td>
  815. <td class="description last"><p>deserialize enum values as
  816. strings instead of numbers. Only works with Protobuf.js 6 values.</p></td>
  817. </tr>
  818. <tr>
  819. <td class="name"><code>deprecatedArgumentOrder</code></td>
  820. <td class="type">
  821. <span class="param-type">bool</span>
  822. </td>
  823. <td class="attributes">
  824. &lt;optional><br>
  825. </td>
  826. <td class="default">
  827. false
  828. </td>
  829. <td class="description last"><p>use the beta method
  830. argument order for client methods, with optional arguments after the
  831. callback. This option is only a temporary stopgap measure to smooth an
  832. API breakage. It is deprecated, and new code should not use it.</p></td>
  833. </tr>
  834. <tr>
  835. <td class="name"><code>protobufjsVersion</code></td>
  836. <td class="type">
  837. <span class="param-type">number</span>
  838. |
  839. <span class="param-type">string</span>
  840. </td>
  841. <td class="attributes">
  842. &lt;optional><br>
  843. </td>
  844. <td class="default">
  845. 'detect'
  846. </td>
  847. <td class="description last"><p>5 and 6
  848. respectively indicate that an object from the corresponding version of
  849. Protobuf.js is provided in the value argument. If the option is 'detect',
  850. gRPC wll guess what the version is based on the structure of the value.</p></td>
  851. </tr>
  852. </tbody>
  853. </table>
  854. </td>
  855. </tr>
  856. </tbody>
  857. </table>
  858. <dl class="details">
  859. <dt class="tag-source">Source:</dt>
  860. <dd class="tag-source"><ul class="dummy"><li>
  861. <a href="index.js.html">index.js</a>, <a href="index.js.html#line73">line 73</a>
  862. </li></ul></dd>
  863. </dl>
  864. <h5>Returns:</h5>
  865. <div class="param-desc">
  866. <p>The resulting gRPC object.</p>
  867. </div>
  868. <dl>
  869. <dt>
  870. Type
  871. </dt>
  872. <dd>
  873. <span class="param-type">Object.&lt;string, *></span>
  874. </dd>
  875. </dl>
  876. <h4 class="name" id=".setLogger"><span class="type-signature">(static) </span>setLogger<span class="signature">(logger)</span><span class="type-signature"></span></h4>
  877. <div class="description">
  878. <p>Sets the logger function for the gRPC module. For debugging purposes, the C
  879. core will log synchronously directly to stdout unless this function is
  880. called. Note: the output format here is intended to be informational, and
  881. is not guaranteed to stay the same in the future.
  882. Logs will be directed to logger.error.</p>
  883. </div>
  884. <h5>Parameters:</h5>
  885. <table class="params">
  886. <thead>
  887. <tr>
  888. <th>Name</th>
  889. <th>Type</th>
  890. <th class="last">Description</th>
  891. </tr>
  892. </thead>
  893. <tbody>
  894. <tr>
  895. <td class="name"><code>logger</code></td>
  896. <td class="type">
  897. <span class="param-type">Console</span>
  898. </td>
  899. <td class="description last"><p>A Console-like object.</p></td>
  900. </tr>
  901. </tbody>
  902. </table>
  903. <dl class="details">
  904. <dt class="tag-source">Source:</dt>
  905. <dd class="tag-source"><ul class="dummy"><li>
  906. <a href="index.js.html">index.js</a>, <a href="index.js.html#line163">line 163</a>
  907. </li></ul></dd>
  908. </dl>
  909. <h4 class="name" id=".setLogVerbosity"><span class="type-signature">(static) </span>setLogVerbosity<span class="signature">(verbosity)</span><span class="type-signature"></span></h4>
  910. <div class="description">
  911. <p>Sets the logger verbosity for gRPC module logging. The options are members
  912. of the grpc.logVerbosity map.</p>
  913. </div>
  914. <h5>Parameters:</h5>
  915. <table class="params">
  916. <thead>
  917. <tr>
  918. <th>Name</th>
  919. <th>Type</th>
  920. <th class="last">Description</th>
  921. </tr>
  922. </thead>
  923. <tbody>
  924. <tr>
  925. <td class="name"><code>verbosity</code></td>
  926. <td class="type">
  927. <span class="param-type">Number</span>
  928. </td>
  929. <td class="description last"><p>The minimum severity to log</p></td>
  930. </tr>
  931. </tbody>
  932. </table>
  933. <dl class="details">
  934. <dt class="tag-source">Source:</dt>
  935. <dd class="tag-source"><ul class="dummy"><li>
  936. <a href="index.js.html">index.js</a>, <a href="index.js.html#line184">line 184</a>
  937. </li></ul></dd>
  938. </dl>
  939. <h4 class="name" id="~getClientChannel"><span class="type-signature">(inner) </span>getClientChannel<span class="signature">(client)</span><span class="type-signature"> &rarr; {Channel}</span></h4>
  940. <div class="description">
  941. <p>Return the underlying channel object for the specified client</p>
  942. </div>
  943. <h5>Parameters:</h5>
  944. <table class="params">
  945. <thead>
  946. <tr>
  947. <th>Name</th>
  948. <th>Type</th>
  949. <th class="last">Description</th>
  950. </tr>
  951. </thead>
  952. <tbody>
  953. <tr>
  954. <td class="name"><code>client</code></td>
  955. <td class="type">
  956. <span class="param-type">Client</span>
  957. </td>
  958. <td class="description last"></td>
  959. </tr>
  960. </tbody>
  961. </table>
  962. <dl class="details">
  963. <dt class="tag-source">Source:</dt>
  964. <dd class="tag-source"><ul class="dummy"><li>
  965. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line930">line 930</a>
  966. </li></ul></dd>
  967. <dt class="tag-see">See:</dt>
  968. <dd class="tag-see">
  969. <ul>
  970. <li><a href="grpc.Client.html#getChannel">grpc.Client#getChannel</a></li>
  971. </ul>
  972. </dd>
  973. </dl>
  974. <h5>Returns:</h5>
  975. <div class="param-desc">
  976. <p>The channel</p>
  977. </div>
  978. <dl>
  979. <dt>
  980. Type
  981. </dt>
  982. <dd>
  983. <span class="param-type">Channel</span>
  984. </dd>
  985. </dl>
  986. <h4 class="name" id="~makeGenericClientConstructor"><span class="type-signature">(inner) </span>makeGenericClientConstructor<span class="signature">(methods, serviceName, class_options)</span><span class="type-signature"> &rarr; {function}</span></h4>
  987. <div class="description">
  988. <p>Creates a constructor for a client with the given methods, as specified in
  989. the methods argument. The resulting class will have an instance method for
  990. each method in the service, which is a partial application of one of the
  991. <a href="grpc.Client.html">Client</a> request methods, depending on <code>requestSerialize</code>
  992. and <code>responseSerialize</code>, with the <code>method</code>, <code>serialize</code>, and <code>deserialize</code>
  993. arguments predefined.</p>
  994. </div>
  995. <h5>Parameters:</h5>
  996. <table class="params">
  997. <thead>
  998. <tr>
  999. <th>Name</th>
  1000. <th>Type</th>
  1001. <th class="last">Description</th>
  1002. </tr>
  1003. </thead>
  1004. <tbody>
  1005. <tr>
  1006. <td class="name"><code>methods</code></td>
  1007. <td class="type">
  1008. <span class="param-type"><a href="grpc.html#~ServiceDefinition">grpc~ServiceDefinition</a></span>
  1009. </td>
  1010. <td class="description last"><p>An object mapping method names to
  1011. method attributes</p></td>
  1012. </tr>
  1013. <tr>
  1014. <td class="name"><code>serviceName</code></td>
  1015. <td class="type">
  1016. <span class="param-type">string</span>
  1017. </td>
  1018. <td class="description last"><p>The fully qualified name of the service</p></td>
  1019. </tr>
  1020. <tr>
  1021. <td class="name"><code>class_options</code></td>
  1022. <td class="type">
  1023. <span class="param-type">Object</span>
  1024. </td>
  1025. <td class="description last"><p>An options object.</p>
  1026. <h6>Properties</h6>
  1027. <table class="params">
  1028. <thead>
  1029. <tr>
  1030. <th>Name</th>
  1031. <th>Type</th>
  1032. <th>Attributes</th>
  1033. <th>Default</th>
  1034. <th class="last">Description</th>
  1035. </tr>
  1036. </thead>
  1037. <tbody>
  1038. <tr>
  1039. <td class="name"><code>deprecatedArgumentOrder</code></td>
  1040. <td class="type">
  1041. <span class="param-type">boolean</span>
  1042. </td>
  1043. <td class="attributes">
  1044. &lt;optional><br>
  1045. </td>
  1046. <td class="default">
  1047. false
  1048. </td>
  1049. <td class="description last"><p>Indicates
  1050. that the old argument order should be used for methods, with optional
  1051. arguments at the end instead of the callback at the end. This option
  1052. is only a temporary stopgap measure to smooth an API breakage.
  1053. It is deprecated, and new code should not use it.</p></td>
  1054. </tr>
  1055. </tbody>
  1056. </table>
  1057. </td>
  1058. </tr>
  1059. </tbody>
  1060. </table>
  1061. <dl class="details">
  1062. <dt class="tag-source">Source:</dt>
  1063. <dd class="tag-source"><ul class="dummy"><li>
  1064. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line874">line 874</a>
  1065. </li></ul></dd>
  1066. </dl>
  1067. <h5>Returns:</h5>
  1068. <div class="param-desc">
  1069. <p>New client constructor, which is a subclass of
  1070. <a href="grpc.Client.html">grpc.Client</a>, and has the same arguments as that constructor.</p>
  1071. </div>
  1072. <dl>
  1073. <dt>
  1074. Type
  1075. </dt>
  1076. <dd>
  1077. <span class="param-type">function</span>
  1078. </dd>
  1079. </dl>
  1080. <h4 class="name" id="~waitForClientReady"><span class="type-signature">(inner) </span>waitForClientReady<span class="signature">(client, deadline, callback)</span><span class="type-signature"></span></h4>
  1081. <div class="description">
  1082. <p>Wait for the client to be ready. The callback will be called when the
  1083. client has successfully connected to the server, and it will be called
  1084. with an error if the attempt to connect to the server has unrecoverablly
  1085. failed or if the deadline expires. This function will make the channel
  1086. start connecting if it has not already done so.</p>
  1087. </div>
  1088. <h5>Parameters:</h5>
  1089. <table class="params">
  1090. <thead>
  1091. <tr>
  1092. <th>Name</th>
  1093. <th>Type</th>
  1094. <th class="last">Description</th>
  1095. </tr>
  1096. </thead>
  1097. <tbody>
  1098. <tr>
  1099. <td class="name"><code>client</code></td>
  1100. <td class="type">
  1101. <span class="param-type">Client</span>
  1102. </td>
  1103. <td class="description last"><p>The client to wait on</p></td>
  1104. </tr>
  1105. <tr>
  1106. <td class="name"><code>deadline</code></td>
  1107. <td class="type">
  1108. <span class="param-type"><a href="grpc.html#~Deadline">grpc~Deadline</a></span>
  1109. </td>
  1110. <td class="description last"><p>When to stop waiting for a connection. Pass
  1111. Infinity to wait forever.</p></td>
  1112. </tr>
  1113. <tr>
  1114. <td class="name"><code>callback</code></td>
  1115. <td class="type">
  1116. <span class="param-type">function</span>
  1117. </td>
  1118. <td class="description last"><p>The callback to call when done attempting
  1119. to connect.</p></td>
  1120. </tr>
  1121. </tbody>
  1122. </table>
  1123. <dl class="details">
  1124. <dt class="tag-source">Source:</dt>
  1125. <dd class="tag-source"><ul class="dummy"><li>
  1126. <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line949">line 949</a>
  1127. </li></ul></dd>
  1128. <dt class="tag-see">See:</dt>
  1129. <dd class="tag-see">
  1130. <ul>
  1131. <li><a href="grpc.Client.html#waitForReady">grpc.Client#waitForReady</a></li>
  1132. </ul>
  1133. </dd>
  1134. </dl>
  1135. <h3 class="subsection-title">Type Definitions</h3>
  1136. <h4 class="name" id="~Deadline">Deadline</h4>
  1137. <div class="description">
  1138. <p>The deadline of an operation. If it is a date, the deadline is reached at
  1139. the date and time specified. If it is a finite number, it is treated as
  1140. a number of milliseconds since the Unix Epoch. If it is Infinity, the
  1141. deadline will never be reached. If it is -Infinity, the deadline has already
  1142. passed.</p>
  1143. </div>
  1144. <h5>Type:</h5>
  1145. <ul>
  1146. <li>
  1147. <span class="param-type">number</span>
  1148. |
  1149. <span class="param-type">date</span>
  1150. </li>
  1151. </ul>
  1152. <dl class="details">
  1153. <dt class="tag-source">Source:</dt>
  1154. <dd class="tag-source"><ul class="dummy"><li>
  1155. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line142">line 142</a>
  1156. </li></ul></dd>
  1157. </dl>
  1158. <h4 class="name" id="~deserialize"><span class="type-signature"></span>deserialize<span class="signature">(data)</span><span class="type-signature"> &rarr; {*}</span></h4>
  1159. <div class="description">
  1160. <p>A deserialization function</p>
  1161. </div>
  1162. <h5>Parameters:</h5>
  1163. <table class="params">
  1164. <thead>
  1165. <tr>
  1166. <th>Name</th>
  1167. <th>Type</th>
  1168. <th class="last">Description</th>
  1169. </tr>
  1170. </thead>
  1171. <tbody>
  1172. <tr>
  1173. <td class="name"><code>data</code></td>
  1174. <td class="type">
  1175. <span class="param-type">Buffer</span>
  1176. </td>
  1177. <td class="description last"><p>The byte sequence to deserialize</p></td>
  1178. </tr>
  1179. </tbody>
  1180. </table>
  1181. <dl class="details">
  1182. <dt class="tag-source">Source:</dt>
  1183. <dd class="tag-source"><ul class="dummy"><li>
  1184. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line135">line 135</a>
  1185. </li></ul></dd>
  1186. </dl>
  1187. <h5>Returns:</h5>
  1188. <div class="param-desc">
  1189. <p>The data deserialized as a value</p>
  1190. </div>
  1191. <dl>
  1192. <dt>
  1193. Type
  1194. </dt>
  1195. <dd>
  1196. <span class="param-type">*</span>
  1197. </dd>
  1198. </dl>
  1199. <h4 class="name" id="~MethodDefinition">MethodDefinition</h4>
  1200. <div class="description">
  1201. <p>An object that completely defines a service method signature.</p>
  1202. </div>
  1203. <h5>Type:</h5>
  1204. <ul>
  1205. <li>
  1206. <span class="param-type">Object</span>
  1207. </li>
  1208. </ul>
  1209. <h5 class="subsection-title">Properties:</h5>
  1210. <table class="props">
  1211. <thead>
  1212. <tr>
  1213. <th>Name</th>
  1214. <th>Type</th>
  1215. <th class="last">Description</th>
  1216. </tr>
  1217. </thead>
  1218. <tbody>
  1219. <tr>
  1220. <td class="name"><code>path</code></td>
  1221. <td class="type">
  1222. <span class="param-type">string</span>
  1223. </td>
  1224. <td class="description last"><p>The method's URL path</p></td>
  1225. </tr>
  1226. <tr>
  1227. <td class="name"><code>requestStream</code></td>
  1228. <td class="type">
  1229. <span class="param-type">boolean</span>
  1230. </td>
  1231. <td class="description last"><p>Indicates whether the method accepts
  1232. a stream of requests</p></td>
  1233. </tr>
  1234. <tr>
  1235. <td class="name"><code>responseStream</code></td>
  1236. <td class="type">
  1237. <span class="param-type">boolean</span>
  1238. </td>
  1239. <td class="description last"><p>Indicates whether the method returns
  1240. a stream of responses</p></td>
  1241. </tr>
  1242. <tr>
  1243. <td class="name"><code>requestSerialize</code></td>
  1244. <td class="type">
  1245. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  1246. </td>
  1247. <td class="description last"><p>Serialization
  1248. function for request values</p></td>
  1249. </tr>
  1250. <tr>
  1251. <td class="name"><code>responseSerialize</code></td>
  1252. <td class="type">
  1253. <span class="param-type"><a href="grpc.html#~serialize">grpc~serialize</a></span>
  1254. </td>
  1255. <td class="description last"><p>Serialization
  1256. function for response values</p></td>
  1257. </tr>
  1258. <tr>
  1259. <td class="name"><code>requestDeserialize</code></td>
  1260. <td class="type">
  1261. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  1262. </td>
  1263. <td class="description last"><p>Deserialization
  1264. function for request data</p></td>
  1265. </tr>
  1266. <tr>
  1267. <td class="name"><code>responseDeserialize</code></td>
  1268. <td class="type">
  1269. <span class="param-type"><a href="grpc.html#~deserialize">grpc~deserialize</a></span>
  1270. </td>
  1271. <td class="description last"><p>Deserialization
  1272. function for repsonse data</p></td>
  1273. </tr>
  1274. </tbody>
  1275. </table>
  1276. <dl class="details">
  1277. <dt class="tag-source">Source:</dt>
  1278. <dd class="tag-source"><ul class="dummy"><li>
  1279. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line151">line 151</a>
  1280. </li></ul></dd>
  1281. </dl>
  1282. <h4 class="name" id="~serialize"><span class="type-signature"></span>serialize<span class="signature">(value)</span><span class="type-signature"> &rarr; {Buffer}</span></h4>
  1283. <div class="description">
  1284. <p>A serialization function</p>
  1285. </div>
  1286. <h5>Parameters:</h5>
  1287. <table class="params">
  1288. <thead>
  1289. <tr>
  1290. <th>Name</th>
  1291. <th>Type</th>
  1292. <th class="last">Description</th>
  1293. </tr>
  1294. </thead>
  1295. <tbody>
  1296. <tr>
  1297. <td class="name"><code>value</code></td>
  1298. <td class="type">
  1299. <span class="param-type">*</span>
  1300. </td>
  1301. <td class="description last"><p>The value to serialize</p></td>
  1302. </tr>
  1303. </tbody>
  1304. </table>
  1305. <dl class="details">
  1306. <dt class="tag-source">Source:</dt>
  1307. <dd class="tag-source"><ul class="dummy"><li>
  1308. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line128">line 128</a>
  1309. </li></ul></dd>
  1310. </dl>
  1311. <h5>Returns:</h5>
  1312. <div class="param-desc">
  1313. <p>The value serialized as a byte sequence</p>
  1314. </div>
  1315. <dl>
  1316. <dt>
  1317. Type
  1318. </dt>
  1319. <dd>
  1320. <span class="param-type">Buffer</span>
  1321. </dd>
  1322. </dl>
  1323. <h4 class="name" id="~ServiceDefinition">ServiceDefinition</h4>
  1324. <div class="description">
  1325. <p>An object that completely defines a service.</p>
  1326. </div>
  1327. <h5>Type:</h5>
  1328. <ul>
  1329. <li>
  1330. <span class="param-type">Object.&lt;string, <a href="grpc.html#~MethodDefinition">grpc~MethodDefinition</a>></span>
  1331. </li>
  1332. </ul>
  1333. <dl class="details">
  1334. <dt class="tag-source">Source:</dt>
  1335. <dd class="tag-source"><ul class="dummy"><li>
  1336. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line169">line 169</a>
  1337. </li></ul></dd>
  1338. </dl>
  1339. <h4 class="name" id="~ServiceError">ServiceError</h4>
  1340. <div class="description">
  1341. <p>Describes how a request has failed. The member <code>message</code> will be the same as
  1342. <code>details</code> in <a href="grpc.html#~StatusObject">grpc~StatusObject</a>, and <code>code</code> and <code>metadata</code> are the
  1343. same as in that object.</p>
  1344. </div>
  1345. <h5>Type:</h5>
  1346. <ul>
  1347. <li>
  1348. <span class="param-type">Error</span>
  1349. </li>
  1350. </ul>
  1351. <h5 class="subsection-title">Properties:</h5>
  1352. <table class="props">
  1353. <thead>
  1354. <tr>
  1355. <th>Name</th>
  1356. <th>Type</th>
  1357. <th class="last">Description</th>
  1358. </tr>
  1359. </thead>
  1360. <tbody>
  1361. <tr>
  1362. <td class="name"><code>code</code></td>
  1363. <td class="type">
  1364. <span class="param-type">number</span>
  1365. </td>
  1366. <td class="description last"><p>The error code, a key of <a href="grpc.html#.status">grpc.status</a> that is
  1367. not <code>grpc.status.OK</code></p></td>
  1368. </tr>
  1369. <tr>
  1370. <td class="name"><code>metadata</code></td>
  1371. <td class="type">
  1372. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  1373. </td>
  1374. <td class="description last"><p>Trailing metadata sent with the status,
  1375. if applicable</p></td>
  1376. </tr>
  1377. </tbody>
  1378. </table>
  1379. <dl class="details">
  1380. <dt class="tag-source">Source:</dt>
  1381. <dd class="tag-source"><ul class="dummy"><li>
  1382. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line93">line 93</a>
  1383. </li></ul></dd>
  1384. </dl>
  1385. <h4 class="name" id="~StatusObject">StatusObject</h4>
  1386. <div class="description">
  1387. <p>Represents the status of a completed request. If <code>code</code> is
  1388. <a href="grpc.html#.status">grpc.status</a>.OK, then the request has completed successfully.
  1389. Otherwise, the request has failed, <code>details</code> will contain a description of
  1390. the error. Either way, <code>metadata</code> contains the trailing response metadata
  1391. sent by the server when it finishes processing the call.</p>
  1392. </div>
  1393. <h5>Type:</h5>
  1394. <ul>
  1395. <li>
  1396. <span class="param-type">object</span>
  1397. </li>
  1398. </ul>
  1399. <h5 class="subsection-title">Properties:</h5>
  1400. <table class="props">
  1401. <thead>
  1402. <tr>
  1403. <th>Name</th>
  1404. <th>Type</th>
  1405. <th class="last">Description</th>
  1406. </tr>
  1407. </thead>
  1408. <tbody>
  1409. <tr>
  1410. <td class="name"><code>code</code></td>
  1411. <td class="type">
  1412. <span class="param-type">number</span>
  1413. </td>
  1414. <td class="description last"><p>The error code, a key of <a href="grpc.html#.status">grpc.status</a></p></td>
  1415. </tr>
  1416. <tr>
  1417. <td class="name"><code>details</code></td>
  1418. <td class="type">
  1419. <span class="param-type">string</span>
  1420. </td>
  1421. <td class="description last"><p>Human-readable description of the status</p></td>
  1422. </tr>
  1423. <tr>
  1424. <td class="name"><code>metadata</code></td>
  1425. <td class="type">
  1426. <span class="param-type"><a href="grpc.Metadata.html">grpc.Metadata</a></span>
  1427. </td>
  1428. <td class="description last"><p>Trailing metadata sent with the status,
  1429. if applicable</p></td>
  1430. </tr>
  1431. </tbody>
  1432. </table>
  1433. <dl class="details">
  1434. <dt class="tag-source">Source:</dt>
  1435. <dd class="tag-source"><ul class="dummy"><li>
  1436. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line80">line 80</a>
  1437. </li></ul></dd>
  1438. </dl>
  1439. </article>
  1440. </section>
  1441. </div>
  1442. <nav>
  1443. <h2><a href="index.html">Home</a></h2><h3>Externals</h3><ul><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></ul><h3>Classes</h3><ul><li><a href="grpc.Client.html">Client</a></li><li><a href="grpc.credentials-CallCredentials.html">CallCredentials</a></li><li><a href="grpc.credentials-ChannelCredentials.html">ChannelCredentials</a></li><li><a href="grpc.Metadata.html">Metadata</a></li><li><a href="grpc.Server.html">Server</a></li><li><a href="grpc.ServerCredentials.html">ServerCredentials</a></li><li><a href="grpc-ClientDuplexStream.html">ClientDuplexStream</a></li><li><a href="grpc-ClientReadableStream.html">ClientReadableStream</a></li><li><a href="grpc-ClientUnaryCall.html">ClientUnaryCall</a></li><li><a href="grpc-ClientWritableStream.html">ClientWritableStream</a></li><li><a href="grpc-ServerDuplexStream.html">ServerDuplexStream</a></li><li><a href="grpc-ServerReadableStream.html">ServerReadableStream</a></li><li><a href="grpc-ServerUnaryCall.html">ServerUnaryCall</a></li><li><a href="grpc-ServerWritableStream.html">ServerWritableStream</a></li></ul><h3>Events</h3><ul><li><a href="grpc-ClientDuplexStream.html#event:metadata">metadata</a></li><li><a href="grpc-ClientDuplexStream.html#event:status">status</a></li><li><a href="grpc-ClientReadableStream.html#event:metadata">metadata</a></li><li><a href="grpc-ClientReadableStream.html#event:status">status</a></li><li><a href="grpc-ClientUnaryCall.html#event:metadata">metadata</a></li><li><a href="grpc-ClientUnaryCall.html#event:status">status</a></li><li><a href="grpc-ClientWritableStream.html#event:metadata">metadata</a></li><li><a href="grpc-ClientWritableStream.html#event:status">status</a></li><li><a href="grpc-ServerDuplexStream.html#~event:cancelled">cancelled</a></li><li><a href="grpc-ServerReadableStream.html#~event:cancelled">cancelled</a></li><li><a href="grpc-ServerUnaryCall.html#~event:cancelled">cancelled</a></li><li><a href="grpc-ServerWritableStream.html#~event:cancelled">cancelled</a></li></ul><h3>Namespaces</h3><ul><li><a href="grpc.html">grpc</a></li><li><a href="grpc.credentials.html">credentials</a></li></ul>
  1444. </nav>
  1445. <br class="clear">
  1446. <footer>
  1447. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.3</a> on Fri Sep 08 2017 11:10:31 GMT-0700 (PDT)
  1448. </footer>
  1449. <script> prettyPrint(); </script>
  1450. <script src="scripts/linenumber.js"> </script>
  1451. </body>
  1452. </html>