grpc.framework.face.html 88 KB

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