grpc.framework.face.html 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>grpc.framework.face package &mdash; grpcio 0.13.1rc1 documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="top" title="grpcio 0.13.1rc1 documentation" href="index.html"/>
  10. <link rel="up" title="grpc.framework package" href="grpc.framework.html"/>
  11. <link rel="next" title="grpc.framework.foundation package" href="grpc.framework.foundation.html"/>
  12. <link rel="prev" title="grpc.framework.crust package" href="grpc.framework.crust.html"/>
  13. <script src="_static/js/modernizr.min.js"></script>
  14. </head>
  15. <body class="wy-body-for-nav" role="document">
  16. <div class="wy-grid-for-nav">
  17. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  18. <div class="wy-side-scroll">
  19. <div class="wy-side-nav-search">
  20. <a href="index.html" class="icon icon-home"> grpcio
  21. </a>
  22. <div class="version">
  23. 0.13.1rc1
  24. </div>
  25. <div role="search">
  26. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  27. <input type="text" name="q" placeholder="Search docs" />
  28. <input type="hidden" name="check_keywords" value="yes" />
  29. <input type="hidden" name="area" value="default" />
  30. </form>
  31. </div>
  32. </div>
  33. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  34. <ul class="current">
  35. <li class="toctree-l1 current"><a class="reference internal" href="grpc.html">grpc package</a><ul class="current">
  36. <li class="toctree-l2 current"><a class="reference internal" href="grpc.html#subpackages">Subpackages</a><ul class="current">
  37. <li class="toctree-l3"><a class="reference internal" href="grpc.beta.html">grpc.beta package</a></li>
  38. <li class="toctree-l3"><a class="reference internal" href="grpc.early_adopter.html">grpc.early_adopter package</a></li>
  39. <li class="toctree-l3 current"><a class="reference internal" href="grpc.framework.html">grpc.framework package</a><ul class="current">
  40. <li class="toctree-l4 current"><a class="reference internal" href="grpc.framework.html#subpackages">Subpackages</a></li>
  41. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.html#module-grpc.framework">Module contents</a></li>
  42. </ul>
  43. </li>
  44. </ul>
  45. </li>
  46. <li class="toctree-l2"><a class="reference internal" href="grpc.html#module-grpc">Module contents</a></li>
  47. </ul>
  48. </li>
  49. </ul>
  50. </div>
  51. </div>
  52. </nav>
  53. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  54. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  55. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  56. <a href="index.html">grpcio</a>
  57. </nav>
  58. <div class="wy-nav-content">
  59. <div class="rst-content">
  60. <div role="navigation" aria-label="breadcrumbs navigation">
  61. <ul class="wy-breadcrumbs">
  62. <li><a href="index.html">Docs</a> &raquo;</li>
  63. <li><a href="grpc.html">grpc package</a> &raquo;</li>
  64. <li><a href="grpc.framework.html">grpc.framework package</a> &raquo;</li>
  65. <li>grpc.framework.face package</li>
  66. <li class="wy-breadcrumbs-aside">
  67. <a href="_sources/grpc.framework.face.txt" rel="nofollow"> View page source</a>
  68. </li>
  69. </ul>
  70. <hr/>
  71. </div>
  72. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  73. <div itemprop="articleBody">
  74. <div class="section" id="grpc-framework-face-package">
  75. <h1>grpc.framework.face package<a class="headerlink" href="#grpc-framework-face-package" title="Permalink to this headline">¶</a></h1>
  76. <div class="section" id="submodules">
  77. <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
  78. </div>
  79. <div class="section" id="module-grpc.framework.face.demonstration">
  80. <span id="grpc-framework-face-demonstration-module"></span><h2>grpc.framework.face.demonstration module<a class="headerlink" href="#module-grpc.framework.face.demonstration" title="Permalink to this headline">¶</a></h2>
  81. <p>Demonstration-suitable implementation of the face layer of RPC Framework.</p>
  82. <dl class="class">
  83. <dt id="grpc.framework.face.demonstration.LinkedPair">
  84. <em class="property">class </em><code class="descclassname">grpc.framework.face.demonstration.</code><code class="descname">LinkedPair</code><a class="reference internal" href="_modules/grpc/framework/face/demonstration.html#LinkedPair"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.demonstration.LinkedPair" title="Permalink to this definition">¶</a></dt>
  85. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  86. <p>A Server and Stub that are linked to one another.</p>
  87. <dl class="attribute">
  88. <dt id="grpc.framework.face.demonstration.LinkedPair.server">
  89. <code class="descname">server</code><a class="headerlink" href="#grpc.framework.face.demonstration.LinkedPair.server" title="Permalink to this definition">¶</a></dt>
  90. <dd><p>A Server.</p>
  91. </dd></dl>
  92. <dl class="attribute">
  93. <dt id="grpc.framework.face.demonstration.LinkedPair.stub">
  94. <code class="descname">stub</code><a class="headerlink" href="#grpc.framework.face.demonstration.LinkedPair.stub" title="Permalink to this definition">¶</a></dt>
  95. <dd><p>A Stub.</p>
  96. </dd></dl>
  97. <dl class="method">
  98. <dt id="grpc.framework.face.demonstration.LinkedPair.shut_down">
  99. <code class="descname">shut_down</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/demonstration.html#LinkedPair.shut_down"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.demonstration.LinkedPair.shut_down" title="Permalink to this definition">¶</a></dt>
  100. <dd><p>Shuts down this object and releases its resources.</p>
  101. </dd></dl>
  102. </dd></dl>
  103. <dl class="function">
  104. <dt id="grpc.framework.face.demonstration.server_and_stub">
  105. <code class="descclassname">grpc.framework.face.demonstration.</code><code class="descname">server_and_stub</code><span class="sig-paren">(</span><em>default_timeout</em>, <em>inline_value_in_value_out_methods=None</em>, <em>inline_value_in_stream_out_methods=None</em>, <em>inline_stream_in_value_out_methods=None</em>, <em>inline_stream_in_stream_out_methods=None</em>, <em>event_value_in_value_out_methods=None</em>, <em>event_value_in_stream_out_methods=None</em>, <em>event_stream_in_value_out_methods=None</em>, <em>event_stream_in_stream_out_methods=None</em>, <em>multi_method=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/demonstration.html#server_and_stub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.demonstration.server_and_stub" title="Permalink to this definition">¶</a></dt>
  106. <dd><p>Creates a Server and Stub linked together for use.</p>
  107. </dd></dl>
  108. </div>
  109. <div class="section" id="module-grpc.framework.face.exceptions">
  110. <span id="grpc-framework-face-exceptions-module"></span><h2>grpc.framework.face.exceptions module<a class="headerlink" href="#module-grpc.framework.face.exceptions" title="Permalink to this headline">¶</a></h2>
  111. <p>Exceptions used in the Face layer of RPC Framework.</p>
  112. <dl class="exception">
  113. <dt id="grpc.framework.face.exceptions.CancellationError">
  114. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">CancellationError</code><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#CancellationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.CancellationError" title="Permalink to this definition">¶</a></dt>
  115. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.face.exceptions.RpcError" title="grpc.framework.face.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.face.exceptions.RpcError</span></code></a></p>
  116. <p>Indicates that an RPC has been cancelled.</p>
  117. </dd></dl>
  118. <dl class="exception">
  119. <dt id="grpc.framework.face.exceptions.ExpirationError">
  120. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">ExpirationError</code><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#ExpirationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.ExpirationError" title="Permalink to this definition">¶</a></dt>
  121. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.face.exceptions.RpcError" title="grpc.framework.face.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.face.exceptions.RpcError</span></code></a></p>
  122. <p>Indicates that an RPC has expired (&#8220;timed out&#8221;).</p>
  123. </dd></dl>
  124. <dl class="exception">
  125. <dt id="grpc.framework.face.exceptions.NetworkError">
  126. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">NetworkError</code><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#NetworkError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.NetworkError" title="Permalink to this definition">¶</a></dt>
  127. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.face.exceptions.RpcError" title="grpc.framework.face.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.face.exceptions.RpcError</span></code></a></p>
  128. <p>Indicates that some error occurred on the network.</p>
  129. </dd></dl>
  130. <dl class="exception">
  131. <dt id="grpc.framework.face.exceptions.NoSuchMethodError">
  132. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">NoSuchMethodError</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#NoSuchMethodError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.NoSuchMethodError" title="Permalink to this definition">¶</a></dt>
  133. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  134. <p>Raised by customer code to indicate an unrecognized RPC method name.</p>
  135. <dl class="attribute">
  136. <dt id="grpc.framework.face.exceptions.NoSuchMethodError.name">
  137. <code class="descname">name</code><a class="headerlink" href="#grpc.framework.face.exceptions.NoSuchMethodError.name" title="Permalink to this definition">¶</a></dt>
  138. <dd><p>The unrecognized name.</p>
  139. </dd></dl>
  140. </dd></dl>
  141. <dl class="exception">
  142. <dt id="grpc.framework.face.exceptions.RpcError">
  143. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">RpcError</code><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#RpcError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.RpcError" title="Permalink to this definition">¶</a></dt>
  144. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  145. <p>Common super type for all exceptions raised by the Face layer.</p>
  146. <p>Only RPC Framework should instantiate and raise these exceptions.</p>
  147. </dd></dl>
  148. <dl class="exception">
  149. <dt id="grpc.framework.face.exceptions.ServicedError">
  150. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">ServicedError</code><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#ServicedError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.ServicedError" title="Permalink to this definition">¶</a></dt>
  151. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.face.exceptions.RpcError" title="grpc.framework.face.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.face.exceptions.RpcError</span></code></a></p>
  152. <p>Indicates that the Serviced failed in the course of an RPC.</p>
  153. </dd></dl>
  154. <dl class="exception">
  155. <dt id="grpc.framework.face.exceptions.ServicerError">
  156. <em class="property">exception </em><code class="descclassname">grpc.framework.face.exceptions.</code><code class="descname">ServicerError</code><a class="reference internal" href="_modules/grpc/framework/face/exceptions.html#ServicerError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.exceptions.ServicerError" title="Permalink to this definition">¶</a></dt>
  157. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.face.exceptions.RpcError" title="grpc.framework.face.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.face.exceptions.RpcError</span></code></a></p>
  158. <p>Indicates that the Servicer failed in the course of servicing an RPC.</p>
  159. </dd></dl>
  160. </div>
  161. <div class="section" id="module-grpc.framework.face.implementations">
  162. <span id="grpc-framework-face-implementations-module"></span><h2>grpc.framework.face.implementations module<a class="headerlink" href="#module-grpc.framework.face.implementations" title="Permalink to this headline">¶</a></h2>
  163. <p>Entry points into the Face layer of RPC Framework.</p>
  164. <dl class="function">
  165. <dt id="grpc.framework.face.implementations.dynamic_stub">
  166. <code class="descclassname">grpc.framework.face.implementations.</code><code class="descname">dynamic_stub</code><span class="sig-paren">(</span><em>cardinalities</em>, <em>front</em>, <em>pool</em>, <em>prefix</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/implementations.html#dynamic_stub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.implementations.dynamic_stub" title="Permalink to this definition">¶</a></dt>
  167. <dd><p>Creates an interfaces.DynamicStub.</p>
  168. <table class="docutils field-list" frame="void" rules="none">
  169. <col class="field-name" />
  170. <col class="field-body" />
  171. <tbody valign="top">
  172. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  173. <li><strong>cardinalities</strong> &#8211; A dict from RPC method name to cardinality.Cardinality
  174. value identifying the cardinality of every RPC method to be supported by
  175. the created interfaces.DynamicStub.</li>
  176. <li><strong>front</strong> &#8211; A base_interfaces.Front.</li>
  177. <li><strong>pool</strong> &#8211; A futures.ThreadPoolExecutor.</li>
  178. <li><strong>prefix</strong> &#8211; A string to prepend when mapping requested attribute name to RPC
  179. method name during attribute access on the created
  180. interfaces.DynamicStub.</li>
  181. </ul>
  182. </td>
  183. </tr>
  184. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  185. <dt>An interfaces.DynamicStub that performs RPCs via the given</dt>
  186. <dd><p class="first last">base_interfaces.Front.</p>
  187. </dd>
  188. </dl>
  189. </p>
  190. </td>
  191. </tr>
  192. </tbody>
  193. </table>
  194. </dd></dl>
  195. <dl class="function">
  196. <dt id="grpc.framework.face.implementations.generic_stub">
  197. <code class="descclassname">grpc.framework.face.implementations.</code><code class="descname">generic_stub</code><span class="sig-paren">(</span><em>front</em>, <em>pool</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/implementations.html#generic_stub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.implementations.generic_stub" title="Permalink to this definition">¶</a></dt>
  198. <dd><p>Creates an interfaces.GenericStub.</p>
  199. <table class="docutils field-list" frame="void" rules="none">
  200. <col class="field-name" />
  201. <col class="field-body" />
  202. <tbody valign="top">
  203. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  204. <li><strong>front</strong> &#8211; A base_interfaces.Front.</li>
  205. <li><strong>pool</strong> &#8211; A futures.ThreadPoolExecutor.</li>
  206. </ul>
  207. </td>
  208. </tr>
  209. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  210. <dt>An interfaces.GenericStub that performs RPCs via the given</dt>
  211. <dd><p class="first last">base_interfaces.Front.</p>
  212. </dd>
  213. </dl>
  214. </p>
  215. </td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. </dd></dl>
  220. <dl class="function">
  221. <dt id="grpc.framework.face.implementations.servicer">
  222. <code class="descclassname">grpc.framework.face.implementations.</code><code class="descname">servicer</code><span class="sig-paren">(</span><em>pool</em>, <em>method_implementations</em>, <em>multi_method_implementation</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/implementations.html#servicer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.implementations.servicer" title="Permalink to this definition">¶</a></dt>
  223. <dd><p>Creates a base_interfaces.Servicer.</p>
  224. <p>It is guaranteed that any passed interfaces.MultiMethodImplementation will
  225. only be called to service an RPC if there is no
  226. interfaces.MethodImplementation for the RPC method in the passed
  227. method_implementations dictionary.</p>
  228. <table class="docutils field-list" frame="void" rules="none">
  229. <col class="field-name" />
  230. <col class="field-body" />
  231. <tbody valign="top">
  232. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  233. <li><strong>pool</strong> &#8211; A thread pool.</li>
  234. <li><strong>method_implementations</strong> &#8211; A dictionary from RPC method name to
  235. interfaces.MethodImplementation object to be used to service the named
  236. RPC method.</li>
  237. <li><strong>multi_method_implementation</strong> &#8211; An interfaces.MultiMethodImplementation to be
  238. used to service any RPCs not serviced by the
  239. interfaces.MethodImplementations given in the method_implementations
  240. dictionary, or None.</li>
  241. </ul>
  242. </td>
  243. </tr>
  244. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A base_interfaces.Servicer that services RPCs via the given implementations.</p>
  245. </td>
  246. </tr>
  247. </tbody>
  248. </table>
  249. </dd></dl>
  250. </div>
  251. <div class="section" id="module-grpc.framework.face.interfaces">
  252. <span id="grpc-framework-face-interfaces-module"></span><h2>grpc.framework.face.interfaces module<a class="headerlink" href="#module-grpc.framework.face.interfaces" title="Permalink to this headline">¶</a></h2>
  253. <p>Interfaces for the face layer of RPC Framework.</p>
  254. <dl class="class">
  255. <dt id="grpc.framework.face.interfaces.Abortion">
  256. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">Abortion</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#Abortion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.Abortion" title="Permalink to this definition">¶</a></dt>
  257. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  258. <p>Categories of RPC abortion.</p>
  259. <dl class="attribute">
  260. <dt id="grpc.framework.face.interfaces.Abortion.CANCELLED">
  261. <code class="descname">CANCELLED</code><em class="property"> = &lt;Abortion.CANCELLED: 'cancelled'&gt;</em><a class="headerlink" href="#grpc.framework.face.interfaces.Abortion.CANCELLED" title="Permalink to this definition">¶</a></dt>
  262. <dd></dd></dl>
  263. <dl class="attribute">
  264. <dt id="grpc.framework.face.interfaces.Abortion.EXPIRED">
  265. <code class="descname">EXPIRED</code><em class="property"> = &lt;Abortion.EXPIRED: 'expired'&gt;</em><a class="headerlink" href="#grpc.framework.face.interfaces.Abortion.EXPIRED" title="Permalink to this definition">¶</a></dt>
  266. <dd></dd></dl>
  267. <dl class="attribute">
  268. <dt id="grpc.framework.face.interfaces.Abortion.NETWORK_FAILURE">
  269. <code class="descname">NETWORK_FAILURE</code><em class="property"> = &lt;Abortion.NETWORK_FAILURE: 'network failure'&gt;</em><a class="headerlink" href="#grpc.framework.face.interfaces.Abortion.NETWORK_FAILURE" title="Permalink to this definition">¶</a></dt>
  270. <dd></dd></dl>
  271. <dl class="attribute">
  272. <dt id="grpc.framework.face.interfaces.Abortion.SERVICED_FAILURE">
  273. <code class="descname">SERVICED_FAILURE</code><em class="property"> = &lt;Abortion.SERVICED_FAILURE: 'serviced failure'&gt;</em><a class="headerlink" href="#grpc.framework.face.interfaces.Abortion.SERVICED_FAILURE" title="Permalink to this definition">¶</a></dt>
  274. <dd></dd></dl>
  275. <dl class="attribute">
  276. <dt id="grpc.framework.face.interfaces.Abortion.SERVICER_FAILURE">
  277. <code class="descname">SERVICER_FAILURE</code><em class="property"> = &lt;Abortion.SERVICER_FAILURE: 'servicer failure'&gt;</em><a class="headerlink" href="#grpc.framework.face.interfaces.Abortion.SERVICER_FAILURE" title="Permalink to this definition">¶</a></dt>
  278. <dd></dd></dl>
  279. </dd></dl>
  280. <dl class="class">
  281. <dt id="grpc.framework.face.interfaces.Call">
  282. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">Call</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#Call"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.Call" title="Permalink to this definition">¶</a></dt>
  283. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  284. <p>Invocation-side representation of an RPC.</p>
  285. <dl class="attribute">
  286. <dt id="grpc.framework.face.interfaces.Call.context">
  287. <code class="descname">context</code><a class="headerlink" href="#grpc.framework.face.interfaces.Call.context" title="Permalink to this definition">¶</a></dt>
  288. <dd><p>An RpcContext affording information about the RPC.</p>
  289. </dd></dl>
  290. <dl class="method">
  291. <dt id="grpc.framework.face.interfaces.Call.cancel">
  292. <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#Call.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.Call.cancel" title="Permalink to this definition">¶</a></dt>
  293. <dd><p>Requests cancellation of the RPC.</p>
  294. </dd></dl>
  295. </dd></dl>
  296. <dl class="class">
  297. <dt id="grpc.framework.face.interfaces.CancellableIterator">
  298. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">CancellableIterator</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#CancellableIterator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.CancellableIterator" title="Permalink to this definition">¶</a></dt>
  299. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  300. <p>Implements the Iterator protocol and affords a cancel method.</p>
  301. <dl class="method">
  302. <dt id="grpc.framework.face.interfaces.CancellableIterator.cancel">
  303. <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#CancellableIterator.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.CancellableIterator.cancel" title="Permalink to this definition">¶</a></dt>
  304. <dd><p>Requests cancellation of whatever computation underlies this iterator.</p>
  305. </dd></dl>
  306. <dl class="method">
  307. <dt id="grpc.framework.face.interfaces.CancellableIterator.next">
  308. <code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#CancellableIterator.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.CancellableIterator.next" title="Permalink to this definition">¶</a></dt>
  309. <dd><p>Returns a value or raises StopIteration per the Iterator protocol.</p>
  310. </dd></dl>
  311. </dd></dl>
  312. <dl class="class">
  313. <dt id="grpc.framework.face.interfaces.DynamicStub">
  314. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">DynamicStub</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#DynamicStub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.DynamicStub" title="Permalink to this definition">¶</a></dt>
  315. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  316. <p>A stub with RPC-method-bound multi-callable attributes.</p>
  317. <p>Instances of this type responsd to attribute access as follows: if the
  318. requested attribute is the name of a unary-unary RPC method, the value of the
  319. attribute will be a UnaryUnaryMultiCallable with which to invoke the RPC
  320. method; if the requested attribute is the name of a unary-stream RPC method,
  321. the value of the attribute will be a UnaryStreamMultiCallable with which to
  322. invoke the RPC method; if the requested attribute is the name of a
  323. stream-unary RPC method, the value of the attribute will be a
  324. StreamUnaryMultiCallable with which to invoke the RPC method; and if the
  325. requested attribute is the name of a stream-stream RPC method, the value of
  326. the attribute will be a StreamStreamMultiCallable with which to invoke the
  327. RPC method.</p>
  328. </dd></dl>
  329. <dl class="class">
  330. <dt id="grpc.framework.face.interfaces.GenericStub">
  331. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">GenericStub</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub" title="Permalink to this definition">¶</a></dt>
  332. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  333. <p>Affords RPC methods to callers.</p>
  334. <dl class="method">
  335. <dt id="grpc.framework.face.interfaces.GenericStub.blocking_stream_in_value_out">
  336. <code class="descname">blocking_stream_in_value_out</code><span class="sig-paren">(</span><em>name</em>, <em>request_iterator</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.blocking_stream_in_value_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.blocking_stream_in_value_out" title="Permalink to this definition">¶</a></dt>
  337. <dd><p>Invokes a stream-request-unary-response RPC method.</p>
  338. <p>This method blocks until either returning the response value of the RPC
  339. (in the event of RPC completion) or raising an exception (in the event of
  340. RPC abortion).</p>
  341. <table class="docutils field-list" frame="void" rules="none">
  342. <col class="field-name" />
  343. <col class="field-body" />
  344. <tbody valign="top">
  345. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  346. <li><strong>name</strong> &#8211; The RPC method name.</li>
  347. <li><strong>request_iterator</strong> &#8211; An iterator that yields the request values of the RPC.</li>
  348. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  349. </ul>
  350. </td>
  351. </tr>
  352. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The response value for the RPC.</p>
  353. </td>
  354. </tr>
  355. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-exc docutils literal"><span class="pre">exceptions.RpcError</span></code> &#8211; Indicating that the RPC was aborted.</p>
  356. </td>
  357. </tr>
  358. </tbody>
  359. </table>
  360. </dd></dl>
  361. <dl class="method">
  362. <dt id="grpc.framework.face.interfaces.GenericStub.blocking_value_in_value_out">
  363. <code class="descname">blocking_value_in_value_out</code><span class="sig-paren">(</span><em>name</em>, <em>request</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.blocking_value_in_value_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.blocking_value_in_value_out" title="Permalink to this definition">¶</a></dt>
  364. <dd><p>Invokes a unary-request-unary-response RPC method.</p>
  365. <p>This method blocks until either returning the response value of the RPC
  366. (in the event of RPC completion) or raising an exception (in the event of
  367. RPC abortion).</p>
  368. <table class="docutils field-list" frame="void" rules="none">
  369. <col class="field-name" />
  370. <col class="field-body" />
  371. <tbody valign="top">
  372. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  373. <li><strong>name</strong> &#8211; The RPC method name.</li>
  374. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  375. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  376. </ul>
  377. </td>
  378. </tr>
  379. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The response value for the RPC.</p>
  380. </td>
  381. </tr>
  382. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-exc docutils literal"><span class="pre">exceptions.RpcError</span></code> &#8211; Indicating that the RPC was aborted.</p>
  383. </td>
  384. </tr>
  385. </tbody>
  386. </table>
  387. </dd></dl>
  388. <dl class="method">
  389. <dt id="grpc.framework.face.interfaces.GenericStub.event_stream_in_stream_out">
  390. <code class="descname">event_stream_in_stream_out</code><span class="sig-paren">(</span><em>name</em>, <em>response_consumer</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.event_stream_in_stream_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.event_stream_in_stream_out" title="Permalink to this definition">¶</a></dt>
  391. <dd><p>Event-driven invocation of a unary-request-stream-response RPC method.</p>
  392. <table class="docutils field-list" frame="void" rules="none">
  393. <col class="field-name" />
  394. <col class="field-body" />
  395. <tbody valign="top">
  396. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  397. <li><strong>name</strong> &#8211; The RPC method name.</li>
  398. <li><strong>response_consumer</strong> &#8211; A stream.Consumer to be called to accept the response
  399. values of the RPC.</li>
  400. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  401. in the event of RPC abortion.</li>
  402. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  403. </ul>
  404. </td>
  405. </tr>
  406. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  407. <dt>A pair of a Call object for the RPC and a stream.Consumer to which the</dt>
  408. <dd><p class="first last">request values of the RPC should be passed.</p>
  409. </dd>
  410. </dl>
  411. </p>
  412. </td>
  413. </tr>
  414. </tbody>
  415. </table>
  416. </dd></dl>
  417. <dl class="method">
  418. <dt id="grpc.framework.face.interfaces.GenericStub.event_stream_in_value_out">
  419. <code class="descname">event_stream_in_value_out</code><span class="sig-paren">(</span><em>name</em>, <em>response_callback</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.event_stream_in_value_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.event_stream_in_value_out" title="Permalink to this definition">¶</a></dt>
  420. <dd><p>Event-driven invocation of a unary-request-unary-response RPC method.</p>
  421. <table class="docutils field-list" frame="void" rules="none">
  422. <col class="field-name" />
  423. <col class="field-body" />
  424. <tbody valign="top">
  425. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  426. <li><strong>name</strong> &#8211; The RPC method name.</li>
  427. <li><strong>response_callback</strong> &#8211; A callback to be called to accept the response value
  428. of the RPC.</li>
  429. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  430. in the event of RPC abortion.</li>
  431. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  432. </ul>
  433. </td>
  434. </tr>
  435. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  436. <dt>A pair of a Call object for the RPC and a stream.Consumer to which the</dt>
  437. <dd><p class="first last">request values of the RPC should be passed.</p>
  438. </dd>
  439. </dl>
  440. </p>
  441. </td>
  442. </tr>
  443. </tbody>
  444. </table>
  445. </dd></dl>
  446. <dl class="method">
  447. <dt id="grpc.framework.face.interfaces.GenericStub.event_value_in_stream_out">
  448. <code class="descname">event_value_in_stream_out</code><span class="sig-paren">(</span><em>name</em>, <em>request</em>, <em>response_consumer</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.event_value_in_stream_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.event_value_in_stream_out" title="Permalink to this definition">¶</a></dt>
  449. <dd><p>Event-driven invocation of a unary-request-stream-response RPC method.</p>
  450. <table class="docutils field-list" frame="void" rules="none">
  451. <col class="field-name" />
  452. <col class="field-body" />
  453. <tbody valign="top">
  454. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  455. <li><strong>name</strong> &#8211; The RPC method name.</li>
  456. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  457. <li><strong>response_consumer</strong> &#8211; A stream.Consumer to be called to accept the response
  458. values of the RPC.</li>
  459. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  460. in the event of RPC abortion.</li>
  461. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  462. </ul>
  463. </td>
  464. </tr>
  465. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Call object for the RPC.</p>
  466. </td>
  467. </tr>
  468. </tbody>
  469. </table>
  470. </dd></dl>
  471. <dl class="method">
  472. <dt id="grpc.framework.face.interfaces.GenericStub.event_value_in_value_out">
  473. <code class="descname">event_value_in_value_out</code><span class="sig-paren">(</span><em>name</em>, <em>request</em>, <em>response_callback</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.event_value_in_value_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.event_value_in_value_out" title="Permalink to this definition">¶</a></dt>
  474. <dd><p>Event-driven invocation of a unary-request-unary-response RPC method.</p>
  475. <table class="docutils field-list" frame="void" rules="none">
  476. <col class="field-name" />
  477. <col class="field-body" />
  478. <tbody valign="top">
  479. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  480. <li><strong>name</strong> &#8211; The RPC method name.</li>
  481. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  482. <li><strong>response_callback</strong> &#8211; A callback to be called to accept the response value
  483. of the RPC.</li>
  484. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  485. in the event of RPC abortion.</li>
  486. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  487. </ul>
  488. </td>
  489. </tr>
  490. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Call object for the RPC.</p>
  491. </td>
  492. </tr>
  493. </tbody>
  494. </table>
  495. </dd></dl>
  496. <dl class="method">
  497. <dt id="grpc.framework.face.interfaces.GenericStub.future_stream_in_value_out">
  498. <code class="descname">future_stream_in_value_out</code><span class="sig-paren">(</span><em>name</em>, <em>request_iterator</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.future_stream_in_value_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.future_stream_in_value_out" title="Permalink to this definition">¶</a></dt>
  499. <dd><p>Invokes a stream-request-unary-response RPC method.</p>
  500. <table class="docutils field-list" frame="void" rules="none">
  501. <col class="field-name" />
  502. <col class="field-body" />
  503. <tbody valign="top">
  504. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  505. <li><strong>name</strong> &#8211; The RPC method name.</li>
  506. <li><strong>request_iterator</strong> &#8211; An iterator that yields the request values of the RPC.</li>
  507. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  508. </ul>
  509. </td>
  510. </tr>
  511. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  512. <dt>A future.Future representing the RPC. In the event of RPC completion, the</dt>
  513. <dd><p class="first last">returned Future will return an outcome indicating that the RPC returned
  514. the response value of the RPC. In the event of RPC abortion, the
  515. returned Future will return an outcome indicating that the RPC raised
  516. an exceptions.RpcError.</p>
  517. </dd>
  518. </dl>
  519. </p>
  520. </td>
  521. </tr>
  522. </tbody>
  523. </table>
  524. </dd></dl>
  525. <dl class="method">
  526. <dt id="grpc.framework.face.interfaces.GenericStub.future_value_in_value_out">
  527. <code class="descname">future_value_in_value_out</code><span class="sig-paren">(</span><em>name</em>, <em>request</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.future_value_in_value_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.future_value_in_value_out" title="Permalink to this definition">¶</a></dt>
  528. <dd><p>Invokes a unary-request-unary-response RPC method.</p>
  529. <table class="docutils field-list" frame="void" rules="none">
  530. <col class="field-name" />
  531. <col class="field-body" />
  532. <tbody valign="top">
  533. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  534. <li><strong>name</strong> &#8211; The RPC method name.</li>
  535. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  536. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  537. </ul>
  538. </td>
  539. </tr>
  540. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  541. <dt>A future.Future representing the RPC. In the event of RPC completion, the</dt>
  542. <dd><p class="first last">returned Future will return an outcome indicating that the RPC returned
  543. the response value of the RPC. In the event of RPC abortion, the
  544. returned Future will return an outcome indicating that the RPC raised
  545. an exceptions.RpcError.</p>
  546. </dd>
  547. </dl>
  548. </p>
  549. </td>
  550. </tr>
  551. </tbody>
  552. </table>
  553. </dd></dl>
  554. <dl class="method">
  555. <dt id="grpc.framework.face.interfaces.GenericStub.inline_stream_in_stream_out">
  556. <code class="descname">inline_stream_in_stream_out</code><span class="sig-paren">(</span><em>name</em>, <em>request_iterator</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.inline_stream_in_stream_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.inline_stream_in_stream_out" title="Permalink to this definition">¶</a></dt>
  557. <dd><p>Invokes a stream-request-stream-response RPC method.</p>
  558. <table class="docutils field-list" frame="void" rules="none">
  559. <col class="field-name" />
  560. <col class="field-body" />
  561. <tbody valign="top">
  562. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  563. <li><strong>name</strong> &#8211; The RPC method name.</li>
  564. <li><strong>request_iterator</strong> &#8211; An iterator that yields the request values of the RPC.</li>
  565. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  566. </ul>
  567. </td>
  568. </tr>
  569. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  570. <dt>A CancellableIterator that yields the response values of the RPC and</dt>
  571. <dd><p class="first last">affords RPC cancellation. Drawing response values from the returned
  572. CancellableIterator may raise exceptions.RpcError indicating abortion of
  573. the RPC.</p>
  574. </dd>
  575. </dl>
  576. </p>
  577. </td>
  578. </tr>
  579. </tbody>
  580. </table>
  581. </dd></dl>
  582. <dl class="method">
  583. <dt id="grpc.framework.face.interfaces.GenericStub.inline_value_in_stream_out">
  584. <code class="descname">inline_value_in_stream_out</code><span class="sig-paren">(</span><em>name</em>, <em>request</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.inline_value_in_stream_out"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.inline_value_in_stream_out" title="Permalink to this definition">¶</a></dt>
  585. <dd><p>Invokes a unary-request-stream-response RPC method.</p>
  586. <table class="docutils field-list" frame="void" rules="none">
  587. <col class="field-name" />
  588. <col class="field-body" />
  589. <tbody valign="top">
  590. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  591. <li><strong>name</strong> &#8211; The RPC method name.</li>
  592. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  593. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  594. </ul>
  595. </td>
  596. </tr>
  597. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  598. <dt>A CancellableIterator that yields the response values of the RPC and</dt>
  599. <dd><p class="first last">affords RPC cancellation. Drawing response values from the returned
  600. CancellableIterator may raise exceptions.RpcError indicating abortion of
  601. the RPC.</p>
  602. </dd>
  603. </dl>
  604. </p>
  605. </td>
  606. </tr>
  607. </tbody>
  608. </table>
  609. </dd></dl>
  610. <dl class="method">
  611. <dt id="grpc.framework.face.interfaces.GenericStub.stream_stream_multi_callable">
  612. <code class="descname">stream_stream_multi_callable</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.stream_stream_multi_callable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.stream_stream_multi_callable" title="Permalink to this definition">¶</a></dt>
  613. <dd><p>Creates a StreamStreamMultiCallable for a stream-stream RPC method.</p>
  614. <table class="docutils field-list" frame="void" rules="none">
  615. <col class="field-name" />
  616. <col class="field-body" />
  617. <tbody valign="top">
  618. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; The RPC method name.</td>
  619. </tr>
  620. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A StreamStreamMultiCallable value for the named stream-stream RPC method.</td>
  621. </tr>
  622. </tbody>
  623. </table>
  624. </dd></dl>
  625. <dl class="method">
  626. <dt id="grpc.framework.face.interfaces.GenericStub.stream_unary_multi_callable">
  627. <code class="descname">stream_unary_multi_callable</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.stream_unary_multi_callable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.stream_unary_multi_callable" title="Permalink to this definition">¶</a></dt>
  628. <dd><p>Creates a StreamUnaryMultiCallable for a stream-unary RPC method.</p>
  629. <table class="docutils field-list" frame="void" rules="none">
  630. <col class="field-name" />
  631. <col class="field-body" />
  632. <tbody valign="top">
  633. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; The RPC method name.</td>
  634. </tr>
  635. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A StreamUnaryMultiCallable value for the named stream-unary RPC method.</td>
  636. </tr>
  637. </tbody>
  638. </table>
  639. </dd></dl>
  640. <dl class="method">
  641. <dt id="grpc.framework.face.interfaces.GenericStub.unary_stream_multi_callable">
  642. <code class="descname">unary_stream_multi_callable</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.unary_stream_multi_callable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.unary_stream_multi_callable" title="Permalink to this definition">¶</a></dt>
  643. <dd><p>Creates a UnaryStreamMultiCallable for a unary-stream RPC method.</p>
  644. <table class="docutils field-list" frame="void" rules="none">
  645. <col class="field-name" />
  646. <col class="field-body" />
  647. <tbody valign="top">
  648. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; The RPC method name.</td>
  649. </tr>
  650. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A UnaryStreamMultiCallable value for the name unary-stream RPC method.</td>
  651. </tr>
  652. </tbody>
  653. </table>
  654. </dd></dl>
  655. <dl class="method">
  656. <dt id="grpc.framework.face.interfaces.GenericStub.unary_unary_multi_callable">
  657. <code class="descname">unary_unary_multi_callable</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#GenericStub.unary_unary_multi_callable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.GenericStub.unary_unary_multi_callable" title="Permalink to this definition">¶</a></dt>
  658. <dd><p>Creates a UnaryUnaryMultiCallable for a unary-unary RPC method.</p>
  659. <table class="docutils field-list" frame="void" rules="none">
  660. <col class="field-name" />
  661. <col class="field-body" />
  662. <tbody valign="top">
  663. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; The RPC method name.</td>
  664. </tr>
  665. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A UnaryUnaryMultiCallable value for the named unary-unary RPC method.</td>
  666. </tr>
  667. </tbody>
  668. </table>
  669. </dd></dl>
  670. </dd></dl>
  671. <dl class="class">
  672. <dt id="grpc.framework.face.interfaces.MethodImplementation">
  673. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">MethodImplementation</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#MethodImplementation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation" title="Permalink to this definition">¶</a></dt>
  674. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  675. <p>A sum type that describes an RPC method implementation.</p>
  676. <dl class="attribute">
  677. <dt id="grpc.framework.face.interfaces.MethodImplementation.cardinality">
  678. <code class="descname">cardinality</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.cardinality" title="Permalink to this definition">¶</a></dt>
  679. <dd><p>A cardinality.Cardinality value.</p>
  680. </dd></dl>
  681. <dl class="attribute">
  682. <dt id="grpc.framework.face.interfaces.MethodImplementation.style">
  683. <code class="descname">style</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.style" title="Permalink to this definition">¶</a></dt>
  684. <dd><p>A style.Service value.</p>
  685. </dd></dl>
  686. <dl class="attribute">
  687. <dt id="grpc.framework.face.interfaces.MethodImplementation.unary_unary_inline">
  688. <code class="descname">unary_unary_inline</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.unary_unary_inline" title="Permalink to this definition">¶</a></dt>
  689. <dd><p>The implementation of the RPC method as a callable
  690. value that takes a request value and an RpcContext object and returns a
  691. response value. Only non-None if cardinality is
  692. cardinality.Cardinality.UNARY_UNARY and style is style.Service.INLINE.</p>
  693. </dd></dl>
  694. <dl class="attribute">
  695. <dt id="grpc.framework.face.interfaces.MethodImplementation.unary_stream_inline">
  696. <code class="descname">unary_stream_inline</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.unary_stream_inline" title="Permalink to this definition">¶</a></dt>
  697. <dd><p>The implementation of the RPC method as a callable
  698. value that takes a request value and an RpcContext object and returns an
  699. iterator of response values. Only non-None if cardinality is
  700. cardinality.Cardinality.UNARY_STREAM and style is style.Service.INLINE.</p>
  701. </dd></dl>
  702. <dl class="attribute">
  703. <dt id="grpc.framework.face.interfaces.MethodImplementation.stream_unary_inline">
  704. <code class="descname">stream_unary_inline</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.stream_unary_inline" title="Permalink to this definition">¶</a></dt>
  705. <dd><p>The implementation of the RPC method as a callable
  706. value that takes an iterator of request values and an RpcContext object
  707. and returns a response value. Only non-None if cardinality is
  708. cardinality.Cardinality.STREAM_UNARY and style is style.Service.INLINE.</p>
  709. </dd></dl>
  710. <dl class="attribute">
  711. <dt id="grpc.framework.face.interfaces.MethodImplementation.stream_stream_inline">
  712. <code class="descname">stream_stream_inline</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.stream_stream_inline" title="Permalink to this definition">¶</a></dt>
  713. <dd><p>The implementation of the RPC method as a callable
  714. value that takes an iterator of request values and an RpcContext object
  715. and returns an iterator of response values. Only non-None if cardinality
  716. is cardinality.Cardinality.STREAM_STREAM and style is
  717. style.Service.INLINE.</p>
  718. </dd></dl>
  719. <dl class="attribute">
  720. <dt id="grpc.framework.face.interfaces.MethodImplementation.unary_unary_event">
  721. <code class="descname">unary_unary_event</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.unary_unary_event" title="Permalink to this definition">¶</a></dt>
  722. <dd><p>The implementation of the RPC method as a callable value
  723. that takes a request value, a response callback to which to pass the
  724. response value of the RPC, and an RpcContext. Only non-None if
  725. cardinality is cardinality.Cardinality.UNARY_UNARY and style is
  726. style.Service.EVENT.</p>
  727. </dd></dl>
  728. <dl class="attribute">
  729. <dt id="grpc.framework.face.interfaces.MethodImplementation.unary_stream_event">
  730. <code class="descname">unary_stream_event</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.unary_stream_event" title="Permalink to this definition">¶</a></dt>
  731. <dd><p>The implementation of the RPC method as a callable
  732. value that takes a request value, a stream.Consumer to which to pass the
  733. the response values of the RPC, and an RpcContext. Only non-None if
  734. cardinality is cardinality.Cardinality.UNARY_STREAM and style is
  735. style.Service.EVENT.</p>
  736. </dd></dl>
  737. <dl class="attribute">
  738. <dt id="grpc.framework.face.interfaces.MethodImplementation.stream_unary_event">
  739. <code class="descname">stream_unary_event</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.stream_unary_event" title="Permalink to this definition">¶</a></dt>
  740. <dd><p>The implementation of the RPC method as a callable
  741. value that takes a response callback to which to pass the response value
  742. of the RPC and an RpcContext and returns a stream.Consumer to which the
  743. request values of the RPC should be passed. Only non-None if cardinality
  744. is cardinality.Cardinality.STREAM_UNARY and style is style.Service.EVENT.</p>
  745. </dd></dl>
  746. <dl class="attribute">
  747. <dt id="grpc.framework.face.interfaces.MethodImplementation.stream_stream_event">
  748. <code class="descname">stream_stream_event</code><a class="headerlink" href="#grpc.framework.face.interfaces.MethodImplementation.stream_stream_event" title="Permalink to this definition">¶</a></dt>
  749. <dd><p>The implementation of the RPC method as a callable
  750. value that takes a stream.Consumer to which to pass the response values
  751. of the RPC and an RpcContext and returns a stream.Consumer to which the
  752. request values of the RPC should be passed. Only non-None if cardinality
  753. is cardinality.Cardinality.STREAM_STREAM and style is
  754. style.Service.EVENT.</p>
  755. </dd></dl>
  756. </dd></dl>
  757. <dl class="class">
  758. <dt id="grpc.framework.face.interfaces.MultiMethodImplementation">
  759. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">MultiMethodImplementation</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#MultiMethodImplementation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.MultiMethodImplementation" title="Permalink to this definition">¶</a></dt>
  760. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  761. <p>A general type able to service many RPC methods.</p>
  762. <dl class="method">
  763. <dt id="grpc.framework.face.interfaces.MultiMethodImplementation.service">
  764. <code class="descname">service</code><span class="sig-paren">(</span><em>name</em>, <em>response_consumer</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#MultiMethodImplementation.service"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.MultiMethodImplementation.service" title="Permalink to this definition">¶</a></dt>
  765. <dd><p>Services an RPC.</p>
  766. <table class="docutils field-list" frame="void" rules="none">
  767. <col class="field-name" />
  768. <col class="field-body" />
  769. <tbody valign="top">
  770. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  771. <li><strong>name</strong> &#8211; The RPC method name.</li>
  772. <li><strong>response_consumer</strong> &#8211; A stream.Consumer to be called to accept the response
  773. values of the RPC.</li>
  774. <li><strong>context</strong> &#8211; An RpcContext object.</li>
  775. </ul>
  776. </td>
  777. </tr>
  778. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><dl class="docutils">
  779. <dt>A stream.Consumer with which to accept the request values of the RPC. The</dt>
  780. <dd><p class="first last">consumer returned from this method may or may not be invoked to
  781. completion: in the case of RPC abortion, RPC Framework will simply stop
  782. passing values to this object. Implementations must not assume that this
  783. object will be called to completion of the request stream or even called
  784. at all.</p>
  785. </dd>
  786. </dl>
  787. </p>
  788. </td>
  789. </tr>
  790. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
  791. <li><code class="xref py py-exc docutils literal"><span class="pre">abandonment.Abandoned</span></code> &#8211; May or may not be raised when the RPC has been
  792. aborted.</li>
  793. <li><code class="xref py py-exc docutils literal"><span class="pre">exceptions.NoSuchMethodError</span></code> &#8211; If this MultiMethod does not recognize the
  794. given RPC method name and is not able to service the RPC.</li>
  795. </ul>
  796. </td>
  797. </tr>
  798. </tbody>
  799. </table>
  800. </dd></dl>
  801. </dd></dl>
  802. <dl class="class">
  803. <dt id="grpc.framework.face.interfaces.RpcContext">
  804. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">RpcContext</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#RpcContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.RpcContext" title="Permalink to this definition">¶</a></dt>
  805. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  806. <p>Provides RPC-related information and action.</p>
  807. <dl class="method">
  808. <dt id="grpc.framework.face.interfaces.RpcContext.add_abortion_callback">
  809. <code class="descname">add_abortion_callback</code><span class="sig-paren">(</span><em>abortion_callback</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#RpcContext.add_abortion_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.RpcContext.add_abortion_callback" title="Permalink to this definition">¶</a></dt>
  810. <dd><p>Registers a callback to be called if the RPC is aborted.</p>
  811. <table class="docutils field-list" frame="void" rules="none">
  812. <col class="field-name" />
  813. <col class="field-body" />
  814. <tbody valign="top">
  815. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>abortion_callback</strong> &#8211; A callable to be called and passed an Abortion value
  816. in the event of RPC abortion.</td>
  817. </tr>
  818. </tbody>
  819. </table>
  820. </dd></dl>
  821. <dl class="method">
  822. <dt id="grpc.framework.face.interfaces.RpcContext.is_active">
  823. <code class="descname">is_active</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#RpcContext.is_active"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.RpcContext.is_active" title="Permalink to this definition">¶</a></dt>
  824. <dd><p>Describes whether the RPC is active or has terminated.</p>
  825. </dd></dl>
  826. <dl class="method">
  827. <dt id="grpc.framework.face.interfaces.RpcContext.time_remaining">
  828. <code class="descname">time_remaining</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#RpcContext.time_remaining"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.RpcContext.time_remaining" title="Permalink to this definition">¶</a></dt>
  829. <dd><p>Describes the length of allowed time remaining for the RPC.</p>
  830. <table class="docutils field-list" frame="void" rules="none">
  831. <col class="field-name" />
  832. <col class="field-body" />
  833. <tbody valign="top">
  834. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A nonnegative float indicating the length of allowed time in seconds
  835. remaining for the RPC to complete before it is considered to have timed
  836. out.</td>
  837. </tr>
  838. </tbody>
  839. </table>
  840. </dd></dl>
  841. </dd></dl>
  842. <dl class="class">
  843. <dt id="grpc.framework.face.interfaces.StreamStreamMultiCallable">
  844. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">StreamStreamMultiCallable</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#StreamStreamMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.StreamStreamMultiCallable" title="Permalink to this definition">¶</a></dt>
  845. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  846. <p>Affords invoking a stream-stream RPC in any call style.</p>
  847. <dl class="method">
  848. <dt id="grpc.framework.face.interfaces.StreamStreamMultiCallable.event">
  849. <code class="descname">event</code><span class="sig-paren">(</span><em>response_consumer</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#StreamStreamMultiCallable.event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.StreamStreamMultiCallable.event" title="Permalink to this definition">¶</a></dt>
  850. <dd><p>Asynchronously invokes the underlying RPC.</p>
  851. <dl class="docutils">
  852. <dt>l Args:</dt>
  853. <dd><blockquote class="first">
  854. <div><dl class="docutils">
  855. <dt>response_consumer: A stream.Consumer to be called to accept the restponse</dt>
  856. <dd>values of the RPC.</dd>
  857. <dt>abortion_callback: A callback to be called and passed an Abortion value</dt>
  858. <dd>in the event of RPC abortion.</dd>
  859. </dl>
  860. <p>timeout: A duration of time in seconds to allow for the RPC.</p>
  861. </div></blockquote>
  862. <dl class="last docutils">
  863. <dt>Returns:</dt>
  864. <dd><dl class="first last docutils">
  865. <dt>A pair of a Call object for the RPC and a stream.Consumer to which the</dt>
  866. <dd>request values of the RPC should be passed.</dd>
  867. </dl>
  868. </dd>
  869. </dl>
  870. </dd>
  871. </dl>
  872. </dd></dl>
  873. </dd></dl>
  874. <dl class="class">
  875. <dt id="grpc.framework.face.interfaces.StreamUnaryMultiCallable">
  876. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">StreamUnaryMultiCallable</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#StreamUnaryMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.StreamUnaryMultiCallable" title="Permalink to this definition">¶</a></dt>
  877. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  878. <p>Affords invoking a stream-unary RPC in any call style.</p>
  879. <dl class="method">
  880. <dt id="grpc.framework.face.interfaces.StreamUnaryMultiCallable.event">
  881. <code class="descname">event</code><span class="sig-paren">(</span><em>response_callback</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#StreamUnaryMultiCallable.event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.StreamUnaryMultiCallable.event" title="Permalink to this definition">¶</a></dt>
  882. <dd><p>Asynchronously invokes the underlying RPC.</p>
  883. <table class="docutils field-list" frame="void" rules="none">
  884. <col class="field-name" />
  885. <col class="field-body" />
  886. <tbody valign="top">
  887. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  888. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  889. <li><strong>response_callback</strong> &#8211; A callback to be called to accept the restponse value
  890. of the RPC.</li>
  891. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  892. in the event of RPC abortion.</li>
  893. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  894. </ul>
  895. </td>
  896. </tr>
  897. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  898. <dt>A pair of a Call object for the RPC and a stream.Consumer to which the</dt>
  899. <dd><p class="first last">request values of the RPC should be passed.</p>
  900. </dd>
  901. </dl>
  902. </p>
  903. </td>
  904. </tr>
  905. </tbody>
  906. </table>
  907. </dd></dl>
  908. <dl class="method">
  909. <dt id="grpc.framework.face.interfaces.StreamUnaryMultiCallable.future">
  910. <code class="descname">future</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#StreamUnaryMultiCallable.future"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.StreamUnaryMultiCallable.future" title="Permalink to this definition">¶</a></dt>
  911. <dd><p>Asynchronously invokes the underlying RPC.</p>
  912. <table class="docutils field-list" frame="void" rules="none">
  913. <col class="field-name" />
  914. <col class="field-body" />
  915. <tbody valign="top">
  916. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  917. <li><strong>request_iterator</strong> &#8211; An iterator that yields request values for the RPC.</li>
  918. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  919. </ul>
  920. </td>
  921. </tr>
  922. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  923. <dt>A future.Future representing the RPC. In the event of RPC completion, the</dt>
  924. <dd><p class="first last">returned Future&#8217;s result value will be the response value of the RPC.
  925. In the event of RPC abortion, the returned Future&#8217;s exception value
  926. will be an exceptions.RpcError.</p>
  927. </dd>
  928. </dl>
  929. </p>
  930. </td>
  931. </tr>
  932. </tbody>
  933. </table>
  934. </dd></dl>
  935. </dd></dl>
  936. <dl class="class">
  937. <dt id="grpc.framework.face.interfaces.UnaryStreamMultiCallable">
  938. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">UnaryStreamMultiCallable</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#UnaryStreamMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.UnaryStreamMultiCallable" title="Permalink to this definition">¶</a></dt>
  939. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  940. <p>Affords invoking a unary-stream RPC in any call style.</p>
  941. <dl class="method">
  942. <dt id="grpc.framework.face.interfaces.UnaryStreamMultiCallable.event">
  943. <code class="descname">event</code><span class="sig-paren">(</span><em>request</em>, <em>response_consumer</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#UnaryStreamMultiCallable.event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.UnaryStreamMultiCallable.event" title="Permalink to this definition">¶</a></dt>
  944. <dd><p>Asynchronously invokes the underlying RPC.</p>
  945. <table class="docutils field-list" frame="void" rules="none">
  946. <col class="field-name" />
  947. <col class="field-body" />
  948. <tbody valign="top">
  949. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  950. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  951. <li><strong>response_consumer</strong> &#8211; A stream.Consumer to be called to accept the restponse
  952. values of the RPC.</li>
  953. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  954. in the event of RPC abortion.</li>
  955. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  956. </ul>
  957. </td>
  958. </tr>
  959. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Call object for the RPC.</p>
  960. </td>
  961. </tr>
  962. </tbody>
  963. </table>
  964. </dd></dl>
  965. </dd></dl>
  966. <dl class="class">
  967. <dt id="grpc.framework.face.interfaces.UnaryUnaryMultiCallable">
  968. <em class="property">class </em><code class="descclassname">grpc.framework.face.interfaces.</code><code class="descname">UnaryUnaryMultiCallable</code><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#UnaryUnaryMultiCallable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.UnaryUnaryMultiCallable" title="Permalink to this definition">¶</a></dt>
  969. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  970. <p>Affords invoking a unary-unary RPC in any call style.</p>
  971. <dl class="method">
  972. <dt id="grpc.framework.face.interfaces.UnaryUnaryMultiCallable.event">
  973. <code class="descname">event</code><span class="sig-paren">(</span><em>request</em>, <em>response_callback</em>, <em>abortion_callback</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#UnaryUnaryMultiCallable.event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.UnaryUnaryMultiCallable.event" title="Permalink to this definition">¶</a></dt>
  974. <dd><p>Asynchronously invokes the underlying RPC.</p>
  975. <table class="docutils field-list" frame="void" rules="none">
  976. <col class="field-name" />
  977. <col class="field-body" />
  978. <tbody valign="top">
  979. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  980. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  981. <li><strong>response_callback</strong> &#8211; A callback to be called to accept the restponse value
  982. of the RPC.</li>
  983. <li><strong>abortion_callback</strong> &#8211; A callback to be called and passed an Abortion value
  984. in the event of RPC abortion.</li>
  985. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  986. </ul>
  987. </td>
  988. </tr>
  989. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A Call object for the RPC.</p>
  990. </td>
  991. </tr>
  992. </tbody>
  993. </table>
  994. </dd></dl>
  995. <dl class="method">
  996. <dt id="grpc.framework.face.interfaces.UnaryUnaryMultiCallable.future">
  997. <code class="descname">future</code><span class="sig-paren">(</span><em>request</em>, <em>timeout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/interfaces.html#UnaryUnaryMultiCallable.future"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.interfaces.UnaryUnaryMultiCallable.future" title="Permalink to this definition">¶</a></dt>
  998. <dd><p>Asynchronously invokes the underlying RPC.</p>
  999. <table class="docutils field-list" frame="void" rules="none">
  1000. <col class="field-name" />
  1001. <col class="field-body" />
  1002. <tbody valign="top">
  1003. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1004. <li><strong>request</strong> &#8211; The request value for the RPC.</li>
  1005. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  1006. </ul>
  1007. </td>
  1008. </tr>
  1009. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  1010. <dt>A future.Future representing the RPC. In the event of RPC completion, the</dt>
  1011. <dd><p class="first last">returned Future&#8217;s result value will be the response value of the RPC.
  1012. In the event of RPC abortion, the returned Future&#8217;s exception value
  1013. will be an exceptions.RpcError.</p>
  1014. </dd>
  1015. </dl>
  1016. </p>
  1017. </td>
  1018. </tr>
  1019. </tbody>
  1020. </table>
  1021. </dd></dl>
  1022. </dd></dl>
  1023. </div>
  1024. <div class="section" id="module-grpc.framework.face.utilities">
  1025. <span id="grpc-framework-face-utilities-module"></span><h2>grpc.framework.face.utilities module<a class="headerlink" href="#module-grpc.framework.face.utilities" title="Permalink to this headline">¶</a></h2>
  1026. <p>Utilities for RPC framework&#8217;s face layer.</p>
  1027. <dl class="function">
  1028. <dt id="grpc.framework.face.utilities.stream_stream_event">
  1029. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">stream_stream_event</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#stream_stream_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.stream_stream_event" title="Permalink to this definition">¶</a></dt>
  1030. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1031. <table class="docutils field-list" frame="void" rules="none">
  1032. <col class="field-name" />
  1033. <col class="field-body" />
  1034. <tbody valign="top">
  1035. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a stream-stream RPC method as a callable
  1036. value that takes a stream.Consumer to which to pass the response values
  1037. of the RPC and an interfaces.RpcContext and returns a stream.Consumer to
  1038. which the request values of the RPC should be passed.</td>
  1039. </tr>
  1040. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1041. </tr>
  1042. </tbody>
  1043. </table>
  1044. </dd></dl>
  1045. <dl class="function">
  1046. <dt id="grpc.framework.face.utilities.stream_stream_inline">
  1047. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">stream_stream_inline</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#stream_stream_inline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.stream_stream_inline" title="Permalink to this definition">¶</a></dt>
  1048. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1049. <table class="docutils field-list" frame="void" rules="none">
  1050. <col class="field-name" />
  1051. <col class="field-body" />
  1052. <tbody valign="top">
  1053. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a stream-stream RPC method as a callable
  1054. value that takes an iterator of request values and an
  1055. interfaces.RpcContext object and returns an iterator of response values.</td>
  1056. </tr>
  1057. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1058. </tr>
  1059. </tbody>
  1060. </table>
  1061. </dd></dl>
  1062. <dl class="function">
  1063. <dt id="grpc.framework.face.utilities.stream_unary_event">
  1064. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">stream_unary_event</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#stream_unary_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.stream_unary_event" title="Permalink to this definition">¶</a></dt>
  1065. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1066. <table class="docutils field-list" frame="void" rules="none">
  1067. <col class="field-name" />
  1068. <col class="field-body" />
  1069. <tbody valign="top">
  1070. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a stream-unary RPC method as a callable
  1071. value that takes a response callback to which to pass the response value
  1072. of the RPC and an interfaces.RpcContext and returns a stream.Consumer to
  1073. which the request values of the RPC should be passed.</td>
  1074. </tr>
  1075. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1076. </tr>
  1077. </tbody>
  1078. </table>
  1079. </dd></dl>
  1080. <dl class="function">
  1081. <dt id="grpc.framework.face.utilities.stream_unary_inline">
  1082. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">stream_unary_inline</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#stream_unary_inline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.stream_unary_inline" title="Permalink to this definition">¶</a></dt>
  1083. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1084. <table class="docutils field-list" frame="void" rules="none">
  1085. <col class="field-name" />
  1086. <col class="field-body" />
  1087. <tbody valign="top">
  1088. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a stream-unary RPC method as a callable
  1089. value that takes an iterator of request values and an
  1090. interfaces.RpcContext object and returns a response value.</td>
  1091. </tr>
  1092. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1093. </tr>
  1094. </tbody>
  1095. </table>
  1096. </dd></dl>
  1097. <dl class="function">
  1098. <dt id="grpc.framework.face.utilities.unary_stream_event">
  1099. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">unary_stream_event</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#unary_stream_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.unary_stream_event" title="Permalink to this definition">¶</a></dt>
  1100. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1101. <table class="docutils field-list" frame="void" rules="none">
  1102. <col class="field-name" />
  1103. <col class="field-body" />
  1104. <tbody valign="top">
  1105. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a unary-stream RPC method as a callable
  1106. value that takes a request value, a stream.Consumer to which to pass the
  1107. the response values of the RPC, and an interfaces.RpcContext.</td>
  1108. </tr>
  1109. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1110. </tr>
  1111. </tbody>
  1112. </table>
  1113. </dd></dl>
  1114. <dl class="function">
  1115. <dt id="grpc.framework.face.utilities.unary_stream_inline">
  1116. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">unary_stream_inline</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#unary_stream_inline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.unary_stream_inline" title="Permalink to this definition">¶</a></dt>
  1117. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1118. <table class="docutils field-list" frame="void" rules="none">
  1119. <col class="field-name" />
  1120. <col class="field-body" />
  1121. <tbody valign="top">
  1122. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a unary-stream RPC method as a callable
  1123. value that takes a request value and an interfaces.RpcContext object and
  1124. returns an iterator of response values.</td>
  1125. </tr>
  1126. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1127. </tr>
  1128. </tbody>
  1129. </table>
  1130. </dd></dl>
  1131. <dl class="function">
  1132. <dt id="grpc.framework.face.utilities.unary_unary_event">
  1133. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">unary_unary_event</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#unary_unary_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.unary_unary_event" title="Permalink to this definition">¶</a></dt>
  1134. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1135. <table class="docutils field-list" frame="void" rules="none">
  1136. <col class="field-name" />
  1137. <col class="field-body" />
  1138. <tbody valign="top">
  1139. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a unary-unary RPC method as a callable
  1140. value that takes a request value, a response callback to which to pass
  1141. the response value of the RPC, and an interfaces.RpcContext.</td>
  1142. </tr>
  1143. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1144. </tr>
  1145. </tbody>
  1146. </table>
  1147. </dd></dl>
  1148. <dl class="function">
  1149. <dt id="grpc.framework.face.utilities.unary_unary_inline">
  1150. <code class="descclassname">grpc.framework.face.utilities.</code><code class="descname">unary_unary_inline</code><span class="sig-paren">(</span><em>behavior</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/face/utilities.html#unary_unary_inline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.face.utilities.unary_unary_inline" title="Permalink to this definition">¶</a></dt>
  1151. <dd><p>Creates an interfaces.MethodImplementation for the given behavior.</p>
  1152. <table class="docutils field-list" frame="void" rules="none">
  1153. <col class="field-name" />
  1154. <col class="field-body" />
  1155. <tbody valign="top">
  1156. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>behavior</strong> &#8211; The implementation of a unary-unary RPC method as a callable value
  1157. that takes a request value and an interfaces.RpcContext object and
  1158. returns a response value.</td>
  1159. </tr>
  1160. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An interfaces.MethodImplementation derived from the given behavior.</td>
  1161. </tr>
  1162. </tbody>
  1163. </table>
  1164. </dd></dl>
  1165. </div>
  1166. <div class="section" id="module-grpc.framework.face">
  1167. <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grpc.framework.face" title="Permalink to this headline">¶</a></h2>
  1168. </div>
  1169. </div>
  1170. </div>
  1171. </div>
  1172. <footer>
  1173. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  1174. <a href="grpc.framework.foundation.html" class="btn btn-neutral float-right" title="grpc.framework.foundation package" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
  1175. <a href="grpc.framework.crust.html" class="btn btn-neutral" title="grpc.framework.crust package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  1176. </div>
  1177. <hr/>
  1178. <div role="contentinfo">
  1179. <p>
  1180. &copy; Copyright 2016, Author.
  1181. </p>
  1182. </div>
  1183. Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  1184. </footer>
  1185. </div>
  1186. </div>
  1187. </section>
  1188. </div>
  1189. <script type="text/javascript">
  1190. var DOCUMENTATION_OPTIONS = {
  1191. URL_ROOT:'./',
  1192. VERSION:'0.13.1rc1',
  1193. COLLAPSE_INDEX:false,
  1194. FILE_SUFFIX:'.html',
  1195. HAS_SOURCE: true
  1196. };
  1197. </script>
  1198. <script type="text/javascript" src="_static/jquery.js"></script>
  1199. <script type="text/javascript" src="_static/underscore.js"></script>
  1200. <script type="text/javascript" src="_static/doctools.js"></script>
  1201. <script type="text/javascript" src="_static/js/theme.js"></script>
  1202. <script type="text/javascript">
  1203. jQuery(function () {
  1204. SphinxRtdTheme.StickyNav.enable();
  1205. });
  1206. </script>
  1207. </body>
  1208. </html>