grpc.framework.interfaces.links.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  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.interfaces.links package &mdash; grpcio 0.10.0a0 documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="top" title="grpcio 0.10.0a0 documentation" href="index.html"/>
  10. <link rel="up" title="grpc.framework.interfaces package" href="grpc.framework.interfaces.html"/>
  11. <link rel="prev" title="grpc.framework.interfaces package" href="grpc.framework.interfaces.html"/>
  12. <script src="_static/js/modernizr.min.js"></script>
  13. </head>
  14. <body class="wy-body-for-nav" role="document">
  15. <div class="wy-grid-for-nav">
  16. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  17. <div class="wy-side-nav-search">
  18. <a href="index.html" class="icon icon-home"> grpcio
  19. </a>
  20. <div role="search">
  21. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  22. <input type="text" name="q" placeholder="Search docs" />
  23. <input type="hidden" name="check_keywords" value="yes" />
  24. <input type="hidden" name="area" value="default" />
  25. </form>
  26. </div>
  27. </div>
  28. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  29. <ul class="current">
  30. <li class="toctree-l1 current"><a class="reference internal" href="grpc.html">grpc package</a><ul class="current">
  31. <li class="toctree-l2 current"><a class="reference internal" href="grpc.html#subpackages">Subpackages</a><ul class="current">
  32. <li class="toctree-l3"><a class="reference internal" href="grpc.early_adopter.html">grpc.early_adopter package</a><ul>
  33. <li class="toctree-l4"><a class="reference internal" href="grpc.early_adopter.html#submodules">Submodules</a></li>
  34. <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>
  35. <li class="toctree-l4"><a class="reference internal" href="grpc.early_adopter.html#module-grpc.early_adopter.implementations_test">grpc.early_adopter.implementations_test module</a></li>
  36. <li class="toctree-l4"><a class="reference internal" href="grpc.early_adopter.html#module-grpc.early_adopter">Module contents</a></li>
  37. </ul>
  38. </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. &nbsp;
  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><a href="grpc.framework.interfaces.html">grpc.framework.interfaces package</a> &raquo;</li>
  66. <li>grpc.framework.interfaces.links package</li>
  67. <li class="wy-breadcrumbs-aside">
  68. <a href="_sources/grpc.framework.interfaces.links.txt" rel="nofollow"> View page source</a>
  69. </li>
  70. </ul>
  71. <hr/>
  72. </div>
  73. <div role="main" class="document">
  74. <div class="section" id="grpc-framework-interfaces-links-package">
  75. <h1>grpc.framework.interfaces.links package<a class="headerlink" href="#grpc-framework-interfaces-links-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.interfaces.links.links">
  80. <span id="grpc-framework-interfaces-links-links-module"></span><h2>grpc.framework.interfaces.links.links module<a class="headerlink" href="#module-grpc.framework.interfaces.links.links" title="Permalink to this headline">¶</a></h2>
  81. <p>The low-level ticket-exchanging-links interface of RPC Framework.</p>
  82. <dl class="class">
  83. <dt id="grpc.framework.interfaces.links.links.Link">
  84. <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.links.links.</code><code class="descname">Link</code><a class="reference internal" href="_modules/grpc/framework/interfaces/links/links.html#Link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.links.Link" title="Permalink to this definition">¶</a></dt>
  85. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  86. <p>Accepts and emits tickets.</p>
  87. <dl class="method">
  88. <dt id="grpc.framework.interfaces.links.links.Link.accept_ticket">
  89. <code class="descname">accept_ticket</code><span class="sig-paren">(</span><em>ticket</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/links.html#Link.accept_ticket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.links.Link.accept_ticket" title="Permalink to this definition">¶</a></dt>
  90. <dd><p>Accept a Ticket.</p>
  91. <table class="docutils field-list" frame="void" rules="none">
  92. <col class="field-name" />
  93. <col class="field-body" />
  94. <tbody valign="top">
  95. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ticket</strong> &#8211; Any Ticket.</td>
  96. </tr>
  97. </tbody>
  98. </table>
  99. </dd></dl>
  100. <dl class="method">
  101. <dt id="grpc.framework.interfaces.links.links.Link.join_link">
  102. <code class="descname">join_link</code><span class="sig-paren">(</span><em>link</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/links.html#Link.join_link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.links.Link.join_link" title="Permalink to this definition">¶</a></dt>
  103. <dd><p>Mates this object with a peer with which it will exchange tickets.</p>
  104. </dd></dl>
  105. </dd></dl>
  106. <dl class="class">
  107. <dt id="grpc.framework.interfaces.links.links.Ticket">
  108. <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.links.links.</code><code class="descname">Ticket</code><a class="reference internal" href="_modules/grpc/framework/interfaces/links/links.html#Ticket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket" title="Permalink to this definition">¶</a></dt>
  109. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.interfaces.links.links.Ticket" title="grpc.framework.interfaces.links.links.Ticket"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.interfaces.links.links.Ticket</span></code></a></p>
  110. <p>A sum type for all values sent from a front to a back.</p>
  111. <dl class="attribute">
  112. <dt id="grpc.framework.interfaces.links.links.Ticket.operation_id">
  113. <code class="descname">operation_id</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.operation_id" title="Permalink to this definition">¶</a></dt>
  114. <dd><p>A unique-with-respect-to-equality hashable object identifying
  115. a particular operation.</p>
  116. </dd></dl>
  117. <dl class="attribute">
  118. <dt id="grpc.framework.interfaces.links.links.Ticket.sequence_number">
  119. <code class="descname">sequence_number</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.sequence_number" title="Permalink to this definition">¶</a></dt>
  120. <dd><p>A zero-indexed integer sequence number identifying the
  121. ticket&#8217;s place in the stream of tickets sent in one direction for the
  122. particular operation.</p>
  123. </dd></dl>
  124. <dl class="attribute">
  125. <dt id="grpc.framework.interfaces.links.links.Ticket.group">
  126. <code class="descname">group</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.group" title="Permalink to this definition">¶</a></dt>
  127. <dd><p>The group to which the method of the operation belongs. Must be
  128. present in the first ticket from invocation side to service side. Ignored
  129. for all other tickets exchanged during the operation.</p>
  130. </dd></dl>
  131. <dl class="attribute">
  132. <dt id="grpc.framework.interfaces.links.links.Ticket.method">
  133. <code class="descname">method</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.method" title="Permalink to this definition">¶</a></dt>
  134. <dd><p>The name of an operation. Must be present in the first ticket from
  135. invocation side to service side. Ignored for all other tickets exchanged
  136. during the operation.</p>
  137. </dd></dl>
  138. <dl class="attribute">
  139. <dt id="grpc.framework.interfaces.links.links.Ticket.subscription">
  140. <code class="descname">subscription</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.subscription" title="Permalink to this definition">¶</a></dt>
  141. <dd><p>A Subscription value describing the interest one side has in
  142. receiving information from the other side. Must be present in the first
  143. ticket from either side. Ignored for all other tickets exchanged during
  144. the operation.</p>
  145. </dd></dl>
  146. <dl class="attribute">
  147. <dt id="grpc.framework.interfaces.links.links.Ticket.timeout">
  148. <code class="descname">timeout</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.timeout" title="Permalink to this definition">¶</a></dt>
  149. <dd><p>A nonzero length of time (measured from the beginning of the
  150. operation) to allow for the entire operation. Must be present in the first
  151. ticket from invocation side to service side. Optional for all other
  152. tickets exchanged during the operation. Receipt of a value from the other
  153. side of the operation indicates the value in use by that side. Setting a
  154. value on a later ticket allows either side to request time extensions (or
  155. even time reductions!) on in-progress operations.</p>
  156. </dd></dl>
  157. <dl class="attribute">
  158. <dt id="grpc.framework.interfaces.links.links.Ticket.allowance">
  159. <code class="descname">allowance</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.allowance" title="Permalink to this definition">¶</a></dt>
  160. <dd><p>A positive integer granting permission for a number of payloads
  161. to be transmitted to the communicating side of the operation, or None if
  162. no additional allowance is being granted with this ticket.</p>
  163. </dd></dl>
  164. <dl class="attribute">
  165. <dt id="grpc.framework.interfaces.links.links.Ticket.initial_metadata">
  166. <code class="descname">initial_metadata</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.initial_metadata" title="Permalink to this definition">¶</a></dt>
  167. <dd><p>An optional metadata value communicated from one side to
  168. the other at the beginning of the operation. May be non-None in at most
  169. one ticket from each side. Any non-None value must appear no later than
  170. the first payload value.</p>
  171. </dd></dl>
  172. <dl class="attribute">
  173. <dt id="grpc.framework.interfaces.links.links.Ticket.payload">
  174. <code class="descname">payload</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.payload" title="Permalink to this definition">¶</a></dt>
  175. <dd><p>A customer payload object. May be None.</p>
  176. </dd></dl>
  177. <dl class="attribute">
  178. <dt id="grpc.framework.interfaces.links.links.Ticket.terminal_metadata">
  179. <code class="descname">terminal_metadata</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.terminal_metadata" title="Permalink to this definition">¶</a></dt>
  180. <dd><p>A metadata value comminicated from one side to the other
  181. at the end of the operation. May be non-None in the same ticket as
  182. the code and message, but must be None for all earlier tickets.</p>
  183. </dd></dl>
  184. <dl class="attribute">
  185. <dt id="grpc.framework.interfaces.links.links.Ticket.code">
  186. <code class="descname">code</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.code" title="Permalink to this definition">¶</a></dt>
  187. <dd><p>A value communicated at operation completion. May be None.</p>
  188. </dd></dl>
  189. <dl class="attribute">
  190. <dt id="grpc.framework.interfaces.links.links.Ticket.message">
  191. <code class="descname">message</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.message" title="Permalink to this definition">¶</a></dt>
  192. <dd><p>A value communicated at operation completion. May be None.</p>
  193. </dd></dl>
  194. <dl class="attribute">
  195. <dt id="grpc.framework.interfaces.links.links.Ticket.termination">
  196. <code class="descname">termination</code><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.termination" title="Permalink to this definition">¶</a></dt>
  197. <dd><p>A Termination value describing the end of the operation, or
  198. None if the operation has not yet terminated. If set, no further tickets
  199. may be sent in the same direction.</p>
  200. </dd></dl>
  201. <dl class="class">
  202. <dt id="grpc.framework.interfaces.links.links.Ticket.Subscription">
  203. <em class="property">class </em><code class="descname">Subscription</code><a class="reference internal" href="_modules/grpc/framework/interfaces/links/links.html#Ticket.Subscription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.Subscription" title="Permalink to this definition">¶</a></dt>
  204. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  205. <p>Identifies the level of subscription of a side of an operation.</p>
  206. </dd></dl>
  207. <dl class="class">
  208. <dt id="grpc.framework.interfaces.links.links.Ticket.Termination">
  209. <em class="property">class </em><code class="descclassname">Ticket.</code><code class="descname">Termination</code><a class="reference internal" href="_modules/grpc/framework/interfaces/links/links.html#Ticket.Termination"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.links.Ticket.Termination" title="Permalink to this definition">¶</a></dt>
  210. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
  211. <p>Identifies the termination of an operation.</p>
  212. </dd></dl>
  213. </dd></dl>
  214. </div>
  215. <div class="section" id="module-grpc.framework.interfaces.links.test_cases">
  216. <span id="grpc-framework-interfaces-links-test-cases-module"></span><h2>grpc.framework.interfaces.links.test_cases module<a class="headerlink" href="#module-grpc.framework.interfaces.links.test_cases" title="Permalink to this headline">¶</a></h2>
  217. <p>Tests of the links interface of RPC Framework.</p>
  218. <dl class="class">
  219. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest">
  220. <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.links.test_cases.</code><code class="descname">TransmissionTest</code><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest" title="Permalink to this definition">¶</a></dt>
  221. <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
  222. <p>Tests ticket transmission between two connected links.</p>
  223. <p>This class must be mixed into a unittest.TestCase that implements the abstract
  224. methods it provides.</p>
  225. <dl class="method">
  226. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.assertMetadataTransmitted">
  227. <code class="descname">assertMetadataTransmitted</code><span class="sig-paren">(</span><em>original_metadata</em>, <em>transmitted_metadata</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.assertMetadataTransmitted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.assertMetadataTransmitted" title="Permalink to this definition">¶</a></dt>
  228. <dd><p>Asserts that transmitted_metadata contains original_metadata.</p>
  229. <table class="docutils field-list" frame="void" rules="none">
  230. <col class="field-name" />
  231. <col class="field-body" />
  232. <tbody valign="top">
  233. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  234. <li><strong>original_metadata</strong> &#8211; A metadata object used in this test.</li>
  235. <li><strong>transmitted_metadata</strong> &#8211; A metadata object obtained after transmission
  236. through the system under test.</li>
  237. </ul>
  238. </td>
  239. </tr>
  240. <tr class="field-even 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">AssertionError</span></code> &#8211;
  241. if the transmitted_metadata object does not contain
  242. original_metadata.</p>
  243. </td>
  244. </tr>
  245. </tbody>
  246. </table>
  247. </dd></dl>
  248. <dl class="method">
  249. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_invocation_completion">
  250. <code class="descname">create_invocation_completion</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_invocation_completion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_invocation_completion" title="Permalink to this definition">¶</a></dt>
  251. <dd><p>Creates values for use as invocation-side code and message.</p>
  252. <table class="docutils field-list" frame="void" rules="none">
  253. <col class="field-name" />
  254. <col class="field-body" />
  255. <tbody valign="top">
  256. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">An invocation-side code value and an invocation-side message value.
  257. Either or both may be None if invocation-side code and/or
  258. invocation-side message transmission is not supported by the links
  259. under test.</td>
  260. </tr>
  261. </tbody>
  262. </table>
  263. </dd></dl>
  264. <dl class="method">
  265. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_invocation_initial_metadata">
  266. <code class="descname">create_invocation_initial_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_invocation_initial_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_invocation_initial_metadata" title="Permalink to this definition">¶</a></dt>
  267. <dd><p>Creates a value for use as invocation-side initial metadata.</p>
  268. <table class="docutils field-list" frame="void" rules="none">
  269. <col class="field-name" />
  270. <col class="field-body" />
  271. <tbody valign="top">
  272. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A metadata value appropriate for use as invocation-side initial metadata
  273. or None if invocation-side initial metadata transmission is not
  274. supported by the links under test.</td>
  275. </tr>
  276. </tbody>
  277. </table>
  278. </dd></dl>
  279. <dl class="method">
  280. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_invocation_terminal_metadata">
  281. <code class="descname">create_invocation_terminal_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_invocation_terminal_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_invocation_terminal_metadata" title="Permalink to this definition">¶</a></dt>
  282. <dd><p>Creates a value for use as invocation-side terminal metadata.</p>
  283. <table class="docutils field-list" frame="void" rules="none">
  284. <col class="field-name" />
  285. <col class="field-body" />
  286. <tbody valign="top">
  287. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A metadata value appropriate for use as invocation-side terminal
  288. metadata or None if invocation-side terminal metadata transmission is
  289. not supported by the links under test.</td>
  290. </tr>
  291. </tbody>
  292. </table>
  293. </dd></dl>
  294. <dl class="method">
  295. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_service_completion">
  296. <code class="descname">create_service_completion</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_service_completion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_service_completion" title="Permalink to this definition">¶</a></dt>
  297. <dd><p>Creates values for use as service-side code and message.</p>
  298. <table class="docutils field-list" frame="void" rules="none">
  299. <col class="field-name" />
  300. <col class="field-body" />
  301. <tbody valign="top">
  302. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A service-side code value and a service-side message value. Either or
  303. both may be None if service-side code and/or service-side message
  304. transmission is not supported by the links under test.</td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. </dd></dl>
  309. <dl class="method">
  310. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_service_initial_metadata">
  311. <code class="descname">create_service_initial_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_service_initial_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_service_initial_metadata" title="Permalink to this definition">¶</a></dt>
  312. <dd><p>Creates a value for use as service-side initial metadata.</p>
  313. <table class="docutils field-list" frame="void" rules="none">
  314. <col class="field-name" />
  315. <col class="field-body" />
  316. <tbody valign="top">
  317. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A metadata value appropriate for use as service-side initial metadata or
  318. None if service-side initial metadata transmission is not supported by
  319. the links under test.</td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. </dd></dl>
  324. <dl class="method">
  325. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_service_terminal_metadata">
  326. <code class="descname">create_service_terminal_metadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_service_terminal_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_service_terminal_metadata" title="Permalink to this definition">¶</a></dt>
  327. <dd><p>Creates a value for use as service-side terminal metadata.</p>
  328. <table class="docutils field-list" frame="void" rules="none">
  329. <col class="field-name" />
  330. <col class="field-body" />
  331. <tbody valign="top">
  332. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A metadata value appropriate for use as service-side terminal metadata or
  333. None if service-side terminal metadata transmission is not supported by
  334. the links under test.</td>
  335. </tr>
  336. </tbody>
  337. </table>
  338. </dd></dl>
  339. <dl class="method">
  340. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.create_transmitting_links">
  341. <code class="descname">create_transmitting_links</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.create_transmitting_links"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.create_transmitting_links" title="Permalink to this definition">¶</a></dt>
  342. <dd><p>Creates two connected links for use in this test.</p>
  343. <table class="docutils field-list" frame="void" rules="none">
  344. <col class="field-name" />
  345. <col class="field-body" />
  346. <tbody valign="top">
  347. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Two links.Links, the first of which will be used on the invocation side
  348. of RPCs and the second of which will be used on the service side of
  349. RPCs.</td>
  350. </tr>
  351. </tbody>
  352. </table>
  353. </dd></dl>
  354. <dl class="method">
  355. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.deserialize_request">
  356. <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/interfaces/links/test_cases.html#TransmissionTest.deserialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.deserialize_request" title="Permalink to this definition">¶</a></dt>
  357. <dd><p>Deserializes a request value used in this test case.</p>
  358. <table class="docutils field-list" frame="void" rules="none">
  359. <col class="field-name" />
  360. <col class="field-body" />
  361. <tbody valign="top">
  362. <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 some request
  363. used in this test case.</td>
  364. </tr>
  365. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The request value encoded by the given bytestring.</td>
  366. </tr>
  367. </tbody>
  368. </table>
  369. </dd></dl>
  370. <dl class="method">
  371. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.deserialize_response">
  372. <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/interfaces/links/test_cases.html#TransmissionTest.deserialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.deserialize_response" title="Permalink to this definition">¶</a></dt>
  373. <dd><p>Deserializes a response value used in this test case.</p>
  374. <table class="docutils field-list" frame="void" rules="none">
  375. <col class="field-name" />
  376. <col class="field-body" />
  377. <tbody valign="top">
  378. <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 some
  379. response used in this test case.</td>
  380. </tr>
  381. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The response value encoded by the given bytestring.</td>
  382. </tr>
  383. </tbody>
  384. </table>
  385. </dd></dl>
  386. <dl class="method">
  387. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.destroy_transmitting_links">
  388. <code class="descname">destroy_transmitting_links</code><span class="sig-paren">(</span><em>invocation_side_link</em>, <em>service_side_link</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.destroy_transmitting_links"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.destroy_transmitting_links" title="Permalink to this definition">¶</a></dt>
  389. <dd><p>Destroys the two connected links created for this test.</p>
  390. <table class="docutils field-list" frame="void" rules="none">
  391. <col class="field-name" />
  392. <col class="field-body" />
  393. <tbody valign="top">
  394. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  395. <li><strong>invocation_side_link</strong> &#8211; The link used on the invocation side of RPCs in
  396. this test.</li>
  397. <li><strong>service_side_link</strong> &#8211; The link used on the service side of RPCs in this
  398. test.</li>
  399. </ul>
  400. </td>
  401. </tr>
  402. </tbody>
  403. </table>
  404. </dd></dl>
  405. <dl class="method">
  406. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.group_and_method">
  407. <code class="descname">group_and_method</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.group_and_method"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.group_and_method" title="Permalink to this definition">¶</a></dt>
  408. <dd><p>Returns the group and method used in this test case.</p>
  409. <table class="docutils field-list" frame="void" rules="none">
  410. <col class="field-name" />
  411. <col class="field-body" />
  412. <tbody valign="top">
  413. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A pair of the group and method used in this test case.</td>
  414. </tr>
  415. </tbody>
  416. </table>
  417. </dd></dl>
  418. <dl class="method">
  419. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.serialize_request">
  420. <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/interfaces/links/test_cases.html#TransmissionTest.serialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.serialize_request" title="Permalink to this definition">¶</a></dt>
  421. <dd><p>Serializes a request value used in this test case.</p>
  422. <table class="docutils field-list" frame="void" rules="none">
  423. <col class="field-name" />
  424. <col class="field-body" />
  425. <tbody valign="top">
  426. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>request</strong> &#8211; A request value created by this test case.</td>
  427. </tr>
  428. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A bytestring that is the serialization of the given request.</td>
  429. </tr>
  430. </tbody>
  431. </table>
  432. </dd></dl>
  433. <dl class="method">
  434. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.serialize_response">
  435. <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/interfaces/links/test_cases.html#TransmissionTest.serialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.serialize_response" title="Permalink to this definition">¶</a></dt>
  436. <dd><p>Serializes a response value used in this test case.</p>
  437. <table class="docutils field-list" frame="void" rules="none">
  438. <col class="field-name" />
  439. <col class="field-body" />
  440. <tbody valign="top">
  441. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>response</strong> &#8211; A response value created by this test case.</td>
  442. </tr>
  443. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A bytestring that is the serialization of the given response.</td>
  444. </tr>
  445. </tbody>
  446. </table>
  447. </dd></dl>
  448. <dl class="method">
  449. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.setUp">
  450. <code class="descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.setUp" title="Permalink to this definition">¶</a></dt>
  451. <dd></dd></dl>
  452. <dl class="method">
  453. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.tearDown">
  454. <code class="descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.tearDown" title="Permalink to this definition">¶</a></dt>
  455. <dd></dd></dl>
  456. <dl class="method">
  457. <dt id="grpc.framework.interfaces.links.test_cases.TransmissionTest.testSimplestRoundTrip">
  458. <code class="descname">testSimplestRoundTrip</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#TransmissionTest.testSimplestRoundTrip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.TransmissionTest.testSimplestRoundTrip" title="Permalink to this definition">¶</a></dt>
  459. <dd><p>Tests transmission of one ticket in each direction.</p>
  460. </dd></dl>
  461. </dd></dl>
  462. <dl class="function">
  463. <dt id="grpc.framework.interfaces.links.test_cases.at_least_n_payloads_received_predicate">
  464. <code class="descclassname">grpc.framework.interfaces.links.test_cases.</code><code class="descname">at_least_n_payloads_received_predicate</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#at_least_n_payloads_received_predicate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.at_least_n_payloads_received_predicate" title="Permalink to this definition">¶</a></dt>
  465. <dd></dd></dl>
  466. <dl class="function">
  467. <dt id="grpc.framework.interfaces.links.test_cases.terminated">
  468. <code class="descclassname">grpc.framework.interfaces.links.test_cases.</code><code class="descname">terminated</code><span class="sig-paren">(</span><em>ticket_sequence</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_cases.html#terminated"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_cases.terminated" title="Permalink to this definition">¶</a></dt>
  469. <dd></dd></dl>
  470. </div>
  471. <div class="section" id="module-grpc.framework.interfaces.links.test_utilities">
  472. <span id="grpc-framework-interfaces-links-test-utilities-module"></span><h2>grpc.framework.interfaces.links.test_utilities module<a class="headerlink" href="#module-grpc.framework.interfaces.links.test_utilities" title="Permalink to this headline">¶</a></h2>
  473. <p>State and behavior appropriate for use in tests.</p>
  474. <dl class="class">
  475. <dt id="grpc.framework.interfaces.links.test_utilities.RecordingLink">
  476. <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.links.test_utilities.</code><code class="descname">RecordingLink</code><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_utilities.html#RecordingLink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_utilities.RecordingLink" title="Permalink to this definition">¶</a></dt>
  477. <dd><p>Bases: <a class="reference internal" href="#grpc.framework.interfaces.links.links.Link" title="grpc.framework.interfaces.links.links.Link"><code class="xref py py-class docutils literal"><span class="pre">grpc.framework.interfaces.links.links.Link</span></code></a></p>
  478. <p>A Link that records every ticket passed to it.</p>
  479. <dl class="method">
  480. <dt id="grpc.framework.interfaces.links.test_utilities.RecordingLink.accept_ticket">
  481. <code class="descname">accept_ticket</code><span class="sig-paren">(</span><em>ticket</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_utilities.html#RecordingLink.accept_ticket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_utilities.RecordingLink.accept_ticket" title="Permalink to this definition">¶</a></dt>
  482. <dd></dd></dl>
  483. <dl class="method">
  484. <dt id="grpc.framework.interfaces.links.test_utilities.RecordingLink.block_until_tickets_satisfy">
  485. <code class="descname">block_until_tickets_satisfy</code><span class="sig-paren">(</span><em>predicate</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_utilities.html#RecordingLink.block_until_tickets_satisfy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_utilities.RecordingLink.block_until_tickets_satisfy" title="Permalink to this definition">¶</a></dt>
  486. <dd><p>Blocks until the received tickets satisfy the given predicate.</p>
  487. <table class="docutils field-list" frame="void" rules="none">
  488. <col class="field-name" />
  489. <col class="field-body" />
  490. <tbody valign="top">
  491. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>predicate</strong> &#8211; A callable that takes a sequence of tickets and returns a
  492. boolean value.</td>
  493. </tr>
  494. </tbody>
  495. </table>
  496. </dd></dl>
  497. <dl class="method">
  498. <dt id="grpc.framework.interfaces.links.test_utilities.RecordingLink.join_link">
  499. <code class="descname">join_link</code><span class="sig-paren">(</span><em>link</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_utilities.html#RecordingLink.join_link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_utilities.RecordingLink.join_link" title="Permalink to this definition">¶</a></dt>
  500. <dd></dd></dl>
  501. <dl class="method">
  502. <dt id="grpc.framework.interfaces.links.test_utilities.RecordingLink.tickets">
  503. <code class="descname">tickets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/links/test_utilities.html#RecordingLink.tickets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.links.test_utilities.RecordingLink.tickets" title="Permalink to this definition">¶</a></dt>
  504. <dd><p>Returns a copy of the list of all tickets received by this Link.</p>
  505. </dd></dl>
  506. </dd></dl>
  507. </div>
  508. <div class="section" id="module-grpc.framework.interfaces.links.utilities">
  509. <span id="grpc-framework-interfaces-links-utilities-module"></span><h2>grpc.framework.interfaces.links.utilities module<a class="headerlink" href="#module-grpc.framework.interfaces.links.utilities" title="Permalink to this headline">¶</a></h2>
  510. <p>Utilities provided as part of the links interface.</p>
  511. </div>
  512. <div class="section" id="module-grpc.framework.interfaces.links">
  513. <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grpc.framework.interfaces.links" title="Permalink to this headline">¶</a></h2>
  514. </div>
  515. </div>
  516. </div>
  517. <footer>
  518. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  519. <a href="grpc.framework.interfaces.html" class="btn btn-neutral" title="grpc.framework.interfaces package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  520. </div>
  521. <hr/>
  522. <div role="contentinfo">
  523. <p>
  524. &copy; Copyright 2015, Author.
  525. </p>
  526. </div>
  527. 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>.
  528. </footer>
  529. </div>
  530. </div>
  531. </section>
  532. </div>
  533. <script type="text/javascript">
  534. var DOCUMENTATION_OPTIONS = {
  535. URL_ROOT:'./',
  536. VERSION:'0.10.0a0',
  537. COLLAPSE_INDEX:false,
  538. FILE_SUFFIX:'.html',
  539. HAS_SOURCE: true
  540. };
  541. </script>
  542. <script type="text/javascript" src="_static/jquery.js"></script>
  543. <script type="text/javascript" src="_static/underscore.js"></script>
  544. <script type="text/javascript" src="_static/doctools.js"></script>
  545. <script type="text/javascript" src="_static/js/theme.js"></script>
  546. <script type="text/javascript">
  547. jQuery(function () {
  548. SphinxRtdTheme.StickyNav.enable();
  549. });
  550. </script>
  551. </body>
  552. </html>