grpc.framework.alpha.html 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  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.alpha package &mdash; grpcio 0.13.1rc1 documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="top" title="grpcio 0.13.1rc1 documentation" href="index.html"/>
  10. <link rel="up" title="grpc.framework package" href="grpc.framework.html"/>
  11. <link rel="next" title="grpc.framework.base package" href="grpc.framework.base.html"/>
  12. <link rel="prev" title="grpc.framework package" href="grpc.framework.html"/>
  13. <script src="_static/js/modernizr.min.js"></script>
  14. </head>
  15. <body class="wy-body-for-nav" role="document">
  16. <div class="wy-grid-for-nav">
  17. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  18. <div class="wy-side-scroll">
  19. <div class="wy-side-nav-search">
  20. <a href="index.html" class="icon icon-home"> grpcio
  21. </a>
  22. <div class="version">
  23. 0.13.1rc1
  24. </div>
  25. <div role="search">
  26. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  27. <input type="text" name="q" placeholder="Search docs" />
  28. <input type="hidden" name="check_keywords" value="yes" />
  29. <input type="hidden" name="area" value="default" />
  30. </form>
  31. </div>
  32. </div>
  33. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  34. <ul class="current">
  35. <li class="toctree-l1 current"><a class="reference internal" href="grpc.html">grpc package</a><ul class="current">
  36. <li class="toctree-l2 current"><a class="reference internal" href="grpc.html#subpackages">Subpackages</a><ul class="current">
  37. <li class="toctree-l3"><a class="reference internal" href="grpc.beta.html">grpc.beta package</a></li>
  38. <li class="toctree-l3"><a class="reference internal" href="grpc.early_adopter.html">grpc.early_adopter package</a></li>
  39. <li class="toctree-l3 current"><a class="reference internal" href="grpc.framework.html">grpc.framework package</a><ul class="current">
  40. <li class="toctree-l4 current"><a class="reference internal" href="grpc.framework.html#subpackages">Subpackages</a></li>
  41. <li class="toctree-l4"><a class="reference internal" href="grpc.framework.html#module-grpc.framework">Module contents</a></li>
  42. </ul>
  43. </li>
  44. </ul>
  45. </li>
  46. <li class="toctree-l2"><a class="reference internal" href="grpc.html#module-grpc">Module contents</a></li>
  47. </ul>
  48. </li>
  49. </ul>
  50. </div>
  51. </div>
  52. </nav>
  53. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  54. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  55. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  56. <a href="index.html">grpcio</a>
  57. </nav>
  58. <div class="wy-nav-content">
  59. <div class="rst-content">
  60. <div role="navigation" aria-label="breadcrumbs navigation">
  61. <ul class="wy-breadcrumbs">
  62. <li><a href="index.html">Docs</a> &raquo;</li>
  63. <li><a href="grpc.html">grpc package</a> &raquo;</li>
  64. <li><a href="grpc.framework.html">grpc.framework package</a> &raquo;</li>
  65. <li>grpc.framework.alpha package</li>
  66. <li class="wy-breadcrumbs-aside">
  67. <a href="_sources/grpc.framework.alpha.txt" rel="nofollow"> View page source</a>
  68. </li>
  69. </ul>
  70. <hr/>
  71. </div>
  72. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  73. <div itemprop="articleBody">
  74. <div class="section" id="grpc-framework-alpha-package">
  75. <h1>grpc.framework.alpha package<a class="headerlink" href="#grpc-framework-alpha-package" title="Permalink to this headline">¶</a></h1>
  76. <div class="section" id="submodules">
  77. <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
  78. </div>
  79. <div class="section" id="module-grpc.framework.alpha.exceptions">
  80. <span id="grpc-framework-alpha-exceptions-module"></span><h2>grpc.framework.alpha.exceptions module<a class="headerlink" href="#module-grpc.framework.alpha.exceptions" title="Permalink to this headline">¶</a></h2>
  81. <p>Exceptions raised by GRPC.</p>
  82. <p>Only GRPC should instantiate and raise these exceptions.</p>
  83. <dl class="exception">
  84. <dt id="grpc.framework.alpha.exceptions.CancellationError">
  85. <em class="property">exception </em><code class="descclassname">grpc.framework.alpha.exceptions.</code><code class="descname">CancellationError</code><a class="reference internal" href="_modules/grpc/framework/alpha/exceptions.html#CancellationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.exceptions.CancellationError" title="Permalink to this definition">¶</a></dt>
  86. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.exceptions.RpcError" title="grpc.framework.alpha.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.exceptions.RpcError</span></code></a></p>
  87. <p>Indicates that an RPC has been cancelled.</p>
  88. </dd></dl>
  89. <dl class="exception">
  90. <dt id="grpc.framework.alpha.exceptions.ExpirationError">
  91. <em class="property">exception </em><code class="descclassname">grpc.framework.alpha.exceptions.</code><code class="descname">ExpirationError</code><a class="reference internal" href="_modules/grpc/framework/alpha/exceptions.html#ExpirationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.exceptions.ExpirationError" title="Permalink to this definition">¶</a></dt>
  92. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.exceptions.RpcError" title="grpc.framework.alpha.exceptions.RpcError"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.exceptions.RpcError</span></code></a></p>
  93. <p>Indicates that an RPC has expired (&#8220;timed out&#8221;).</p>
  94. </dd></dl>
  95. <dl class="exception">
  96. <dt id="grpc.framework.alpha.exceptions.RpcError">
  97. <em class="property">exception </em><code class="descclassname">grpc.framework.alpha.exceptions.</code><code class="descname">RpcError</code><a class="reference internal" href="_modules/grpc/framework/alpha/exceptions.html#RpcError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.exceptions.RpcError" title="Permalink to this definition">¶</a></dt>
  98. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
  99. <p>Common super type for all exceptions raised by GRPC.</p>
  100. </dd></dl>
  101. </div>
  102. <div class="section" id="module-grpc.framework.alpha.interfaces">
  103. <span id="grpc-framework-alpha-interfaces-module"></span><h2>grpc.framework.alpha.interfaces module<a class="headerlink" href="#module-grpc.framework.alpha.interfaces" title="Permalink to this headline">¶</a></h2>
  104. <p>Interfaces of GRPC.</p>
  105. <dl class="class">
  106. <dt id="grpc.framework.alpha.interfaces.Abortion">
  107. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Abortion</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Abortion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion" title="Permalink to this definition">¶</a></dt>
  108. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  109. <p>Categories of RPC abortion.</p>
  110. <dl class="attribute">
  111. <dt id="grpc.framework.alpha.interfaces.Abortion.CANCELLED">
  112. <code class="descname">CANCELLED</code><em class="property"> = &lt;Abortion.CANCELLED: 'cancelled'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion.CANCELLED" title="Permalink to this definition">¶</a></dt>
  113. <dd></dd></dl>
  114. <dl class="attribute">
  115. <dt id="grpc.framework.alpha.interfaces.Abortion.EXPIRED">
  116. <code class="descname">EXPIRED</code><em class="property"> = &lt;Abortion.EXPIRED: 'expired'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion.EXPIRED" title="Permalink to this definition">¶</a></dt>
  117. <dd></dd></dl>
  118. <dl class="attribute">
  119. <dt id="grpc.framework.alpha.interfaces.Abortion.NETWORK_FAILURE">
  120. <code class="descname">NETWORK_FAILURE</code><em class="property"> = &lt;Abortion.NETWORK_FAILURE: 'network failure'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion.NETWORK_FAILURE" title="Permalink to this definition">¶</a></dt>
  121. <dd></dd></dl>
  122. <dl class="attribute">
  123. <dt id="grpc.framework.alpha.interfaces.Abortion.SERVICED_FAILURE">
  124. <code class="descname">SERVICED_FAILURE</code><em class="property"> = &lt;Abortion.SERVICED_FAILURE: 'serviced failure'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion.SERVICED_FAILURE" title="Permalink to this definition">¶</a></dt>
  125. <dd></dd></dl>
  126. <dl class="attribute">
  127. <dt id="grpc.framework.alpha.interfaces.Abortion.SERVICER_FAILURE">
  128. <code class="descname">SERVICER_FAILURE</code><em class="property"> = &lt;Abortion.SERVICER_FAILURE: 'servicer failure'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Abortion.SERVICER_FAILURE" title="Permalink to this definition">¶</a></dt>
  129. <dd></dd></dl>
  130. </dd></dl>
  131. <dl class="class">
  132. <dt id="grpc.framework.alpha.interfaces.CancellableIterator">
  133. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">CancellableIterator</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator" title="Permalink to this definition">¶</a></dt>
  134. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  135. <p>Implements the Iterator protocol and affords a cancel method.</p>
  136. <dl class="method">
  137. <dt id="grpc.framework.alpha.interfaces.CancellableIterator.cancel">
  138. <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator.cancel" title="Permalink to this definition">¶</a></dt>
  139. <dd><p>Requests cancellation of whatever computation underlies this iterator.</p>
  140. </dd></dl>
  141. <dl class="method">
  142. <dt id="grpc.framework.alpha.interfaces.CancellableIterator.next">
  143. <code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#CancellableIterator.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.CancellableIterator.next" title="Permalink to this definition">¶</a></dt>
  144. <dd><p>Returns a value or raises StopIteration per the Iterator protocol.</p>
  145. </dd></dl>
  146. </dd></dl>
  147. <dl class="class">
  148. <dt id="grpc.framework.alpha.interfaces.Cardinality">
  149. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Cardinality</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Cardinality"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Cardinality" title="Permalink to this definition">¶</a></dt>
  150. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  151. <p>Constants for the four cardinalities of RPC.</p>
  152. <dl class="attribute">
  153. <dt id="grpc.framework.alpha.interfaces.Cardinality.STREAM_STREAM">
  154. <code class="descname">STREAM_STREAM</code><em class="property"> = &lt;Cardinality.STREAM_STREAM: 'request-streaming/response-streaming'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Cardinality.STREAM_STREAM" title="Permalink to this definition">¶</a></dt>
  155. <dd></dd></dl>
  156. <dl class="attribute">
  157. <dt id="grpc.framework.alpha.interfaces.Cardinality.STREAM_UNARY">
  158. <code class="descname">STREAM_UNARY</code><em class="property"> = &lt;Cardinality.STREAM_UNARY: 'request-streaming/response-unary'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Cardinality.STREAM_UNARY" title="Permalink to this definition">¶</a></dt>
  159. <dd></dd></dl>
  160. <dl class="attribute">
  161. <dt id="grpc.framework.alpha.interfaces.Cardinality.UNARY_STREAM">
  162. <code class="descname">UNARY_STREAM</code><em class="property"> = &lt;Cardinality.UNARY_STREAM: 'request-unary/response-streaming'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Cardinality.UNARY_STREAM" title="Permalink to this definition">¶</a></dt>
  163. <dd></dd></dl>
  164. <dl class="attribute">
  165. <dt id="grpc.framework.alpha.interfaces.Cardinality.UNARY_UNARY">
  166. <code class="descname">UNARY_UNARY</code><em class="property"> = &lt;Cardinality.UNARY_UNARY: 'request-unary/response-unary'&gt;</em><a class="headerlink" href="#grpc.framework.alpha.interfaces.Cardinality.UNARY_UNARY" title="Permalink to this definition">¶</a></dt>
  167. <dd></dd></dl>
  168. </dd></dl>
  169. <dl class="class">
  170. <dt id="grpc.framework.alpha.interfaces.RpcContext">
  171. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcContext</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext" title="Permalink to this definition">¶</a></dt>
  172. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  173. <p>Provides RPC-related information and action.</p>
  174. <dl class="method">
  175. <dt id="grpc.framework.alpha.interfaces.RpcContext.add_abortion_callback">
  176. <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/alpha/interfaces.html#RpcContext.add_abortion_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext.add_abortion_callback" title="Permalink to this definition">¶</a></dt>
  177. <dd><p>Registers a callback to be called if the RPC is aborted.
  178. :param abortion_callback: A callable to be called and passed an Abortion value</p>
  179. <blockquote>
  180. <div>in the event of RPC abortion.</div></blockquote>
  181. </dd></dl>
  182. <dl class="method">
  183. <dt id="grpc.framework.alpha.interfaces.RpcContext.is_active">
  184. <code class="descname">is_active</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext.is_active"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext.is_active" title="Permalink to this definition">¶</a></dt>
  185. <dd><p>Describes whether the RPC is active or has terminated.</p>
  186. </dd></dl>
  187. <dl class="method">
  188. <dt id="grpc.framework.alpha.interfaces.RpcContext.time_remaining">
  189. <code class="descname">time_remaining</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcContext.time_remaining"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcContext.time_remaining" title="Permalink to this definition">¶</a></dt>
  190. <dd><p>Describes the length of allowed time remaining for the RPC.
  191. :returns: A nonnegative float indicating the length of allowed time in seconds</p>
  192. <blockquote>
  193. <div>remaining for the RPC to complete before it is considered to have timed
  194. out.</div></blockquote>
  195. </dd></dl>
  196. </dd></dl>
  197. <dl class="class">
  198. <dt id="grpc.framework.alpha.interfaces.RpcMethodDescription">
  199. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcMethodDescription</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodDescription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodDescription" title="Permalink to this definition">¶</a></dt>
  200. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  201. <p>A type for the common aspects of RPC method descriptions.</p>
  202. <dl class="method">
  203. <dt id="grpc.framework.alpha.interfaces.RpcMethodDescription.cardinality">
  204. <code class="descname">cardinality</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodDescription.cardinality"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodDescription.cardinality" title="Permalink to this definition">¶</a></dt>
  205. <dd><p>Identifies the cardinality of this RpcMethodDescription.</p>
  206. <table class="docutils field-list" frame="void" rules="none">
  207. <col class="field-name" />
  208. <col class="field-body" />
  209. <tbody valign="top">
  210. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  211. <dt>A Cardinality value identifying whether or not this</dt>
  212. <dd>RpcMethodDescription is request-unary or request-streaming and
  213. whether or not it is response-unary or response-streaming.</dd>
  214. </dl>
  215. </td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. </dd></dl>
  220. </dd></dl>
  221. <dl class="class">
  222. <dt id="grpc.framework.alpha.interfaces.RpcMethodInvocationDescription">
  223. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcMethodInvocationDescription</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodInvocationDescription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodInvocationDescription" title="Permalink to this definition">¶</a></dt>
  224. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.interfaces.RpcMethodDescription" title="grpc.framework.alpha.interfaces.RpcMethodDescription"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.interfaces.RpcMethodDescription</span></code></a></p>
  225. <p>Invocation-side description of an RPC method.</p>
  226. <dl class="method">
  227. <dt id="grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.deserialize_response">
  228. <code class="descname">deserialize_response</code><span class="sig-paren">(</span><em>serialized_response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodInvocationDescription.deserialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.deserialize_response" title="Permalink to this definition">¶</a></dt>
  229. <dd><p>Deserializes a response value.</p>
  230. <table class="docutils field-list" frame="void" rules="none">
  231. <col class="field-name" />
  232. <col class="field-body" />
  233. <tbody valign="top">
  234. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>serialized_response</strong> &#8211; A bytestring that is the serialization of a response
  235. value appropriate for the RPC method described by this
  236. RpcMethodInvocationDescription.</td>
  237. </tr>
  238. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A response value corresponding to the given bytestring.</td>
  239. </tr>
  240. </tbody>
  241. </table>
  242. </dd></dl>
  243. <dl class="method">
  244. <dt id="grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.serialize_request">
  245. <code class="descname">serialize_request</code><span class="sig-paren">(</span><em>request</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodInvocationDescription.serialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodInvocationDescription.serialize_request" title="Permalink to this definition">¶</a></dt>
  246. <dd><p>Serializes a request value.</p>
  247. <table class="docutils field-list" frame="void" rules="none">
  248. <col class="field-name" />
  249. <col class="field-body" />
  250. <tbody valign="top">
  251. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>request</strong> &#8211; A request value appropriate for the RPC method described by this
  252. RpcMethodInvocationDescription.</td>
  253. </tr>
  254. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  255. <dt>The serialization of the given request value as a</dt>
  256. <dd>bytestring.</dd>
  257. </dl>
  258. </td>
  259. </tr>
  260. </tbody>
  261. </table>
  262. </dd></dl>
  263. </dd></dl>
  264. <dl class="class">
  265. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription">
  266. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">RpcMethodServiceDescription</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription" title="Permalink to this definition">¶</a></dt>
  267. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.alpha.interfaces.RpcMethodDescription" title="grpc.framework.alpha.interfaces.RpcMethodDescription"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.alpha.interfaces.RpcMethodDescription</span></code></a></p>
  268. <p>Service-side description of an RPC method.</p>
  269. <dl class="method">
  270. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.deserialize_request">
  271. <code class="descname">deserialize_request</code><span class="sig-paren">(</span><em>serialized_request</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.deserialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.deserialize_request" title="Permalink to this definition">¶</a></dt>
  272. <dd><p>Deserializes a request value.</p>
  273. <table class="docutils field-list" frame="void" rules="none">
  274. <col class="field-name" />
  275. <col class="field-body" />
  276. <tbody valign="top">
  277. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>serialized_request</strong> &#8211; A bytestring that is the serialization of a request
  278. value appropriate for the RPC method described by this
  279. RpcMethodServiceDescription.</td>
  280. </tr>
  281. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A request value corresponding to the given bytestring.</td>
  282. </tr>
  283. </tbody>
  284. </table>
  285. </dd></dl>
  286. <dl class="method">
  287. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.serialize_response">
  288. <code class="descname">serialize_response</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.serialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.serialize_response" title="Permalink to this definition">¶</a></dt>
  289. <dd><p>Serializes a response value.</p>
  290. <table class="docutils field-list" frame="void" rules="none">
  291. <col class="field-name" />
  292. <col class="field-body" />
  293. <tbody valign="top">
  294. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>response</strong> &#8211; A response value appropriate for the RPC method described by
  295. this RpcMethodServiceDescription.</td>
  296. </tr>
  297. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  298. <dt>The serialization of the given response value as a</dt>
  299. <dd>bytestring.</dd>
  300. </dl>
  301. </td>
  302. </tr>
  303. </tbody>
  304. </table>
  305. </dd></dl>
  306. <dl class="method">
  307. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_stream">
  308. <code class="descname">service_stream_stream</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_stream_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_stream" title="Permalink to this definition">¶</a></dt>
  309. <dd><p>Carries out this RPC.</p>
  310. <p>This method may only be called if the cardinality of this
  311. RpcMethodServiceDescription is Cardinality.STREAM_STREAM.</p>
  312. <table class="docutils field-list" frame="void" rules="none">
  313. <col class="field-name" />
  314. <col class="field-body" />
  315. <tbody valign="top">
  316. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  317. <li><strong>request_iterator</strong> &#8211; An iterator of request values appropriate for the RPC
  318. method described by this RpcMethodServiceDescription.</li>
  319. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  320. </ul>
  321. </td>
  322. </tr>
  323. <tr class="field-even field"><th class="field-name">Yields:</th><td class="field-body"><dl class="first last docutils">
  324. <dt>Zero or more response values appropriate for the RPC method described by</dt>
  325. <dd><p class="first last">this RpcMethodServiceDescription.</p>
  326. </dd>
  327. </dl>
  328. </td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. </dd></dl>
  333. <dl class="method">
  334. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_unary">
  335. <code class="descname">service_stream_unary</code><span class="sig-paren">(</span><em>request_iterator</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_stream_unary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_stream_unary" title="Permalink to this definition">¶</a></dt>
  336. <dd><p>Carries out this RPC.</p>
  337. <p>This method may only be called if the cardinality of this
  338. RpcMethodServiceDescription is Cardinality.STREAM_UNARY.</p>
  339. <table class="docutils field-list" frame="void" rules="none">
  340. <col class="field-name" />
  341. <col class="field-body" />
  342. <tbody valign="top">
  343. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  344. <li><strong>request_iterator</strong> &#8211; An iterator of request values appropriate for the RPC
  345. method described by this RpcMethodServiceDescription.</li>
  346. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  347. </ul>
  348. </td>
  349. </tr>
  350. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  351. <dt>A response value appropriate for the RPC method described by this</dt>
  352. <dd><p class="first last">RpcMethodServiceDescription.</p>
  353. </dd>
  354. </dl>
  355. </p>
  356. </td>
  357. </tr>
  358. </tbody>
  359. </table>
  360. </dd></dl>
  361. <dl class="method">
  362. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_stream">
  363. <code class="descname">service_unary_stream</code><span class="sig-paren">(</span><em>request</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_unary_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_stream" title="Permalink to this definition">¶</a></dt>
  364. <dd><p>Carries out this RPC.</p>
  365. <p>This method may only be called if the cardinality of this
  366. RpcMethodServiceDescription is Cardinality.UNARY_STREAM.</p>
  367. <table class="docutils field-list" frame="void" rules="none">
  368. <col class="field-name" />
  369. <col class="field-body" />
  370. <tbody valign="top">
  371. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  372. <li><strong>request</strong> &#8211; A request value appropriate for the RPC method described by this
  373. RpcMethodServiceDescription.</li>
  374. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  375. </ul>
  376. </td>
  377. </tr>
  378. <tr class="field-even field"><th class="field-name">Yields:</th><td class="field-body"><dl class="first last docutils">
  379. <dt>Zero or more response values appropriate for the RPC method described by</dt>
  380. <dd><p class="first last">this RpcMethodServiceDescription.</p>
  381. </dd>
  382. </dl>
  383. </td>
  384. </tr>
  385. </tbody>
  386. </table>
  387. </dd></dl>
  388. <dl class="method">
  389. <dt id="grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_unary">
  390. <code class="descname">service_unary_unary</code><span class="sig-paren">(</span><em>request</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#RpcMethodServiceDescription.service_unary_unary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.RpcMethodServiceDescription.service_unary_unary" title="Permalink to this definition">¶</a></dt>
  391. <dd><p>Carries out this RPC.</p>
  392. <p>This method may only be called if the cardinality of this
  393. RpcMethodServiceDescription is Cardinality.UNARY_UNARY.</p>
  394. <table class="docutils field-list" frame="void" rules="none">
  395. <col class="field-name" />
  396. <col class="field-body" />
  397. <tbody valign="top">
  398. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  399. <li><strong>request</strong> &#8211; A request value appropriate for the RPC method described by this
  400. RpcMethodServiceDescription.</li>
  401. <li><strong>context</strong> &#8211; An RpcContext object for the RPC.</li>
  402. </ul>
  403. </td>
  404. </tr>
  405. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  406. <dt>A response value appropriate for the RPC method described by this</dt>
  407. <dd><p class="first last">RpcMethodServiceDescription.</p>
  408. </dd>
  409. </dl>
  410. </p>
  411. </td>
  412. </tr>
  413. </tbody>
  414. </table>
  415. </dd></dl>
  416. </dd></dl>
  417. <dl class="class">
  418. <dt id="grpc.framework.alpha.interfaces.Server">
  419. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Server</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Server"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Server" title="Permalink to this definition">¶</a></dt>
  420. <dd><p>Bases: <a class="reference internal" href="grpc.framework.foundation.html#grpc.framework.foundation.activated.Activated" title="grpc.framework.foundation.activated.Activated"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.foundation.activated.Activated</span></code></a></p>
  421. <p>A GRPC Server.</p>
  422. <dl class="method">
  423. <dt id="grpc.framework.alpha.interfaces.Server.port">
  424. <code class="descname">port</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Server.port"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Server.port" title="Permalink to this definition">¶</a></dt>
  425. <dd><p>Reports the port on which the server is serving.</p>
  426. <p>This method may only be called while the server is activated.</p>
  427. <table class="docutils field-list" frame="void" rules="none">
  428. <col class="field-name" />
  429. <col class="field-body" />
  430. <tbody valign="top">
  431. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The port on which the server is serving.</td>
  432. </tr>
  433. </tbody>
  434. </table>
  435. </dd></dl>
  436. </dd></dl>
  437. <dl class="class">
  438. <dt id="grpc.framework.alpha.interfaces.StreamUnarySyncAsync">
  439. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">StreamUnarySyncAsync</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#StreamUnarySyncAsync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.StreamUnarySyncAsync" title="Permalink to this definition">¶</a></dt>
  440. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  441. <p>Affords invoking a stream-unary RPC synchronously or asynchronously.
  442. Values implementing this interface are directly callable and present an
  443. &#8220;async&#8221; method. Both calls take an iterator of request values and a numeric
  444. timeout. Direct invocation of a value of this type invokes its associated RPC
  445. and blocks until the RPC&#8217;s response is available. Calling the &#8220;async&#8221; method
  446. of a value of this type invokes its associated RPC and immediately returns a
  447. future.Future bound to the asynchronous execution of the RPC.</p>
  448. <dl class="method">
  449. <dt id="grpc.framework.alpha.interfaces.StreamUnarySyncAsync.async">
  450. <code class="descname">async</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/alpha/interfaces.html#StreamUnarySyncAsync.async"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.StreamUnarySyncAsync.async" title="Permalink to this definition">¶</a></dt>
  451. <dd><p>Asynchronously invokes the underlying RPC.</p>
  452. <table class="docutils field-list" frame="void" rules="none">
  453. <col class="field-name" />
  454. <col class="field-body" />
  455. <tbody valign="top">
  456. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  457. <li><strong>request_iterator</strong> &#8211; An iterator that yields request values for the RPC.</li>
  458. <li><strong>timeout</strong> &#8211; A duration of time in seconds to allow for the RPC.</li>
  459. </ul>
  460. </td>
  461. </tr>
  462. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  463. <dt>A future.Future representing the RPC. In the event of RPC completion, the</dt>
  464. <dd><p class="first last">returned Future&#8217;s result value will be the response value of the RPC.
  465. In the event of RPC abortion, the returned Future&#8217;s exception value
  466. will be an exceptions.RpcError.</p>
  467. </dd>
  468. </dl>
  469. </p>
  470. </td>
  471. </tr>
  472. </tbody>
  473. </table>
  474. </dd></dl>
  475. </dd></dl>
  476. <dl class="class">
  477. <dt id="grpc.framework.alpha.interfaces.Stub">
  478. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">Stub</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#Stub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.Stub" title="Permalink to this definition">¶</a></dt>
  479. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  480. <p>A stub with callable RPC method names for attributes.</p>
  481. <p>Instances of this type are context managers and only afford RPC invocation
  482. when used in context.</p>
  483. <p>Instances of this type, when used in context, respond to attribute access
  484. as follows: if the requested attribute is the name of a unary-unary RPC
  485. method, the value of the attribute will be a UnaryUnarySyncAsync with which
  486. to invoke the RPC method. If the requested attribute is the name of a
  487. unary-stream RPC method, the value of the attribute will be a callable taking
  488. a request object and a timeout parameter and returning a CancellableIterator
  489. that yields the response values of the RPC. If the requested attribute is the
  490. name of a stream-unary RPC method, the value of the attribute will be a
  491. StreamUnarySyncAsync with which to invoke the RPC method. If the requested
  492. attribute is the name of a stream-stream RPC method, the value of the
  493. attribute will be a callable taking an iterator of request objects and a
  494. timeout and returning a CancellableIterator that yields the response values
  495. of the RPC.</p>
  496. <p>In all cases indication of abortion is indicated by raising of
  497. exceptions.RpcError, exceptions.CancellationError,
  498. and exceptions.ExpirationError.</p>
  499. </dd></dl>
  500. <dl class="class">
  501. <dt id="grpc.framework.alpha.interfaces.UnaryUnarySyncAsync">
  502. <em class="property">class </em><code class="descclassname">grpc.framework.alpha.interfaces.</code><code class="descname">UnaryUnarySyncAsync</code><a class="reference internal" href="_modules/grpc/framework/alpha/interfaces.html#UnaryUnarySyncAsync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.UnaryUnarySyncAsync" title="Permalink to this definition">¶</a></dt>
  503. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  504. <p>Affords invoking a unary-unary RPC synchronously or asynchronously.
  505. Values implementing this interface are directly callable and present an
  506. &#8220;async&#8221; method. Both calls take a request value and a numeric timeout.
  507. Direct invocation of a value of this type invokes its associated RPC and
  508. blocks until the RPC&#8217;s response is available. Calling the &#8220;async&#8221; method
  509. of a value of this type invokes its associated RPC and immediately returns a
  510. future.Future bound to the asynchronous execution of the RPC.</p>
  511. <dl class="method">
  512. <dt id="grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.async">
  513. <code class="descname">async</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/alpha/interfaces.html#UnaryUnarySyncAsync.async"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.async" title="Permalink to this definition">¶</a></dt>
  514. <dd><p>Asynchronously invokes the underlying RPC.
  515. :param request: The request value for the RPC.
  516. :param timeout: A duration of time in seconds to allow for the RPC.</p>
  517. <table class="docutils field-list" frame="void" rules="none">
  518. <col class="field-name" />
  519. <col class="field-body" />
  520. <tbody valign="top">
  521. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
  522. <dt>A future.Future representing the RPC. In the event of RPC completion, the</dt>
  523. <dd>returned Future&#8217;s result value will be the response value of the RPC.
  524. In the event of RPC abortion, the returned Future&#8217;s exception value
  525. will be an exceptions.RpcError.</dd>
  526. </dl>
  527. </td>
  528. </tr>
  529. </tbody>
  530. </table>
  531. </dd></dl>
  532. </dd></dl>
  533. </div>
  534. <div class="section" id="module-grpc.framework.alpha.utilities">
  535. <span id="grpc-framework-alpha-utilities-module"></span><h2>grpc.framework.alpha.utilities module<a class="headerlink" href="#module-grpc.framework.alpha.utilities" title="Permalink to this headline">¶</a></h2>
  536. <p>Utilities for use with GRPC.</p>
  537. <dl class="function">
  538. <dt id="grpc.framework.alpha.utilities.stream_stream_invocation_description">
  539. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_stream_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_stream_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_stream_invocation_description" title="Permalink to this definition">¶</a></dt>
  540. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  541. <table class="docutils field-list" frame="void" rules="none">
  542. <col class="field-name" />
  543. <col class="field-body" />
  544. <tbody valign="top">
  545. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  546. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  547. value returns a bytestring corresponding to that value.</li>
  548. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  549. bytestring returns the response value corresponding to
  550. that bytestring.</li>
  551. </ul>
  552. </td>
  553. </tr>
  554. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  555. <dt>An interfaces.RpcMethodInvocationDescription constructed from the given</dt>
  556. <dd><p class="first last">arguments representing a streaming-request/streaming-response RPC
  557. method.</p>
  558. </dd>
  559. </dl>
  560. </p>
  561. </td>
  562. </tr>
  563. </tbody>
  564. </table>
  565. </dd></dl>
  566. <dl class="function">
  567. <dt id="grpc.framework.alpha.utilities.stream_stream_service_description">
  568. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_stream_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_stream_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_stream_service_description" title="Permalink to this definition">¶</a></dt>
  569. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  570. <table class="docutils field-list" frame="void" rules="none">
  571. <col class="field-name" />
  572. <col class="field-body" />
  573. <tbody valign="top">
  574. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  575. <li><strong>behavior</strong> &#8211; A callable that implements a stream-stream RPC
  576. method that accepts an iterator of zero or more requests
  577. and an interfaces.RpcContext and returns an iterator of
  578. zero or more responses.</li>
  579. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  580. bytestring returns the request value corresponding to that
  581. bytestring.</li>
  582. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  583. response value returns the bytestring corresponding to
  584. that value.</li>
  585. </ul>
  586. </td>
  587. </tr>
  588. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  589. <dt>An interfaces.RpcMethodServiceDescription constructed from the given</dt>
  590. <dd><p class="first last">arguments representing a
  591. streaming-request/streaming-response RPC method.</p>
  592. </dd>
  593. </dl>
  594. </p>
  595. </td>
  596. </tr>
  597. </tbody>
  598. </table>
  599. </dd></dl>
  600. <dl class="function">
  601. <dt id="grpc.framework.alpha.utilities.stream_unary_invocation_description">
  602. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_unary_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_unary_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_unary_invocation_description" title="Permalink to this definition">¶</a></dt>
  603. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  604. <table class="docutils field-list" frame="void" rules="none">
  605. <col class="field-name" />
  606. <col class="field-body" />
  607. <tbody valign="top">
  608. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  609. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  610. value returns a bytestring corresponding to that value.</li>
  611. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  612. bytestring returns the response value corresponding to
  613. that bytestring.</li>
  614. </ul>
  615. </td>
  616. </tr>
  617. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  618. <dt>An interfaces.RpcMethodInvocationDescription constructed from the given</dt>
  619. <dd><p class="first last">arguments representing a streaming-request/unary-response RPC method.</p>
  620. </dd>
  621. </dl>
  622. </p>
  623. </td>
  624. </tr>
  625. </tbody>
  626. </table>
  627. </dd></dl>
  628. <dl class="function">
  629. <dt id="grpc.framework.alpha.utilities.stream_unary_service_description">
  630. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">stream_unary_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#stream_unary_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.stream_unary_service_description" title="Permalink to this definition">¶</a></dt>
  631. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  632. <table class="docutils field-list" frame="void" rules="none">
  633. <col class="field-name" />
  634. <col class="field-body" />
  635. <tbody valign="top">
  636. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  637. <li><strong>behavior</strong> &#8211; A callable that implements a stream-unary RPC
  638. method that accepts an iterator of zero or more requests
  639. and an interfaces.RpcContext and returns a single response.</li>
  640. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  641. bytestring returns the request value corresponding to that
  642. bytestring.</li>
  643. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  644. response value returns the bytestring corresponding to
  645. that value.</li>
  646. </ul>
  647. </td>
  648. </tr>
  649. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  650. <dt>An interfaces.RpcMethodServiceDescription constructed from the given</dt>
  651. <dd><p class="first last">arguments representing a streaming-request/unary-response
  652. RPC method.</p>
  653. </dd>
  654. </dl>
  655. </p>
  656. </td>
  657. </tr>
  658. </tbody>
  659. </table>
  660. </dd></dl>
  661. <dl class="function">
  662. <dt id="grpc.framework.alpha.utilities.unary_stream_invocation_description">
  663. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_stream_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_stream_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_stream_invocation_description" title="Permalink to this definition">¶</a></dt>
  664. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  665. <table class="docutils field-list" frame="void" rules="none">
  666. <col class="field-name" />
  667. <col class="field-body" />
  668. <tbody valign="top">
  669. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  670. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  671. value returns a bytestring corresponding to that value.</li>
  672. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  673. bytestring returns the response value corresponding to
  674. that bytestring.</li>
  675. </ul>
  676. </td>
  677. </tr>
  678. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  679. <dt>An interfaces.RpcMethodInvocationDescription constructed from the given</dt>
  680. <dd><p class="first last">arguments representing a unary-request/streaming-response RPC method.</p>
  681. </dd>
  682. </dl>
  683. </p>
  684. </td>
  685. </tr>
  686. </tbody>
  687. </table>
  688. </dd></dl>
  689. <dl class="function">
  690. <dt id="grpc.framework.alpha.utilities.unary_stream_service_description">
  691. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_stream_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_stream_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_stream_service_description" title="Permalink to this definition">¶</a></dt>
  692. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  693. <table class="docutils field-list" frame="void" rules="none">
  694. <col class="field-name" />
  695. <col class="field-body" />
  696. <tbody valign="top">
  697. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  698. <li><strong>behavior</strong> &#8211; A callable that implements a unary-stream RPC
  699. method that accepts a single request and an interfaces.RpcContext
  700. and returns an iterator of zero or more responses.</li>
  701. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  702. bytestring returns the request value corresponding to that
  703. bytestring.</li>
  704. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  705. response value returns the bytestring corresponding to
  706. that value.</li>
  707. </ul>
  708. </td>
  709. </tr>
  710. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  711. <dt>An interfaces.RpcMethodServiceDescription constructed from the given</dt>
  712. <dd><p class="first last">arguments representing a unary-request/streaming-response
  713. RPC method.</p>
  714. </dd>
  715. </dl>
  716. </p>
  717. </td>
  718. </tr>
  719. </tbody>
  720. </table>
  721. </dd></dl>
  722. <dl class="function">
  723. <dt id="grpc.framework.alpha.utilities.unary_unary_invocation_description">
  724. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_unary_invocation_description</code><span class="sig-paren">(</span><em>request_serializer</em>, <em>response_deserializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_unary_invocation_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_unary_invocation_description" title="Permalink to this definition">¶</a></dt>
  725. <dd><p>Creates an interfaces.RpcMethodInvocationDescription for an RPC method.</p>
  726. <table class="docutils field-list" frame="void" rules="none">
  727. <col class="field-name" />
  728. <col class="field-body" />
  729. <tbody valign="top">
  730. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  731. <li><strong>request_serializer</strong> &#8211; A callable that when called on a request
  732. value returns a bytestring corresponding to that value.</li>
  733. <li><strong>response_deserializer</strong> &#8211; A callable that when called on a
  734. bytestring returns the response value corresponding to
  735. that bytestring.</li>
  736. </ul>
  737. </td>
  738. </tr>
  739. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  740. <dt>An interfaces.RpcMethodInvocationDescription constructed from the given</dt>
  741. <dd><p class="first last">arguments representing a unary-request/unary-response RPC method.</p>
  742. </dd>
  743. </dl>
  744. </p>
  745. </td>
  746. </tr>
  747. </tbody>
  748. </table>
  749. </dd></dl>
  750. <dl class="function">
  751. <dt id="grpc.framework.alpha.utilities.unary_unary_service_description">
  752. <code class="descclassname">grpc.framework.alpha.utilities.</code><code class="descname">unary_unary_service_description</code><span class="sig-paren">(</span><em>behavior</em>, <em>request_deserializer</em>, <em>response_serializer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/alpha/utilities.html#unary_unary_service_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.alpha.utilities.unary_unary_service_description" title="Permalink to this definition">¶</a></dt>
  753. <dd><p>Creates an interfaces.RpcMethodServiceDescription for the given behavior.</p>
  754. <table class="docutils field-list" frame="void" rules="none">
  755. <col class="field-name" />
  756. <col class="field-body" />
  757. <tbody valign="top">
  758. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  759. <li><strong>behavior</strong> &#8211; A callable that implements a unary-unary RPC
  760. method that accepts a single request and an interfaces.RpcContext and
  761. returns a single response.</li>
  762. <li><strong>request_deserializer</strong> &#8211; A callable that when called on a
  763. bytestring returns the request value corresponding to that
  764. bytestring.</li>
  765. <li><strong>response_serializer</strong> &#8211; A callable that when called on a
  766. response value returns the bytestring corresponding to
  767. that value.</li>
  768. </ul>
  769. </td>
  770. </tr>
  771. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
  772. <dt>An interfaces.RpcMethodServiceDescription constructed from the given</dt>
  773. <dd><p class="first last">arguments representing a unary-request/unary-response RPC
  774. method.</p>
  775. </dd>
  776. </dl>
  777. </p>
  778. </td>
  779. </tr>
  780. </tbody>
  781. </table>
  782. </dd></dl>
  783. </div>
  784. <div class="section" id="module-grpc.framework.alpha">
  785. <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grpc.framework.alpha" title="Permalink to this headline">¶</a></h2>
  786. </div>
  787. </div>
  788. </div>
  789. </div>
  790. <footer>
  791. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  792. <a href="grpc.framework.base.html" class="btn btn-neutral float-right" title="grpc.framework.base package" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
  793. <a href="grpc.framework.html" class="btn btn-neutral" title="grpc.framework package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  794. </div>
  795. <hr/>
  796. <div role="contentinfo">
  797. <p>
  798. &copy; Copyright 2016, Author.
  799. </p>
  800. </div>
  801. 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>.
  802. </footer>
  803. </div>
  804. </div>
  805. </section>
  806. </div>
  807. <script type="text/javascript">
  808. var DOCUMENTATION_OPTIONS = {
  809. URL_ROOT:'./',
  810. VERSION:'0.13.1rc1',
  811. COLLAPSE_INDEX:false,
  812. FILE_SUFFIX:'.html',
  813. HAS_SOURCE: true
  814. };
  815. </script>
  816. <script type="text/javascript" src="_static/jquery.js"></script>
  817. <script type="text/javascript" src="_static/underscore.js"></script>
  818. <script type="text/javascript" src="_static/doctools.js"></script>
  819. <script type="text/javascript" src="_static/js/theme.js"></script>
  820. <script type="text/javascript">
  821. jQuery(function () {
  822. SphinxRtdTheme.StickyNav.enable();
  823. });
  824. </script>
  825. </body>
  826. </html>