cardinality.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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.common.cardinality &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="Module code" href="../../../index.html"/>
  11. <script src="_static/js/modernizr.min.js"></script>
  12. </head>
  13. <body class="wy-body-for-nav" role="document">
  14. <div class="wy-grid-for-nav">
  15. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  16. <div class="wy-side-nav-search">
  17. <a href="../../../../index.html" class="icon icon-home"> grpcio
  18. </a>
  19. <div role="search">
  20. <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
  21. <input type="text" name="q" placeholder="Search docs" />
  22. <input type="hidden" name="check_keywords" value="yes" />
  23. <input type="hidden" name="area" value="default" />
  24. </form>
  25. </div>
  26. </div>
  27. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  28. <ul>
  29. <li class="toctree-l1"><a class="reference internal" href="../../../../grpc.html">grpc package</a><ul>
  30. <li class="toctree-l2"><a class="reference internal" href="../../../../grpc.html#subpackages">Subpackages</a><ul>
  31. <li class="toctree-l3"><a class="reference internal" href="../../../../grpc.early_adopter.html">grpc.early_adopter package</a><ul>
  32. <li class="toctree-l4"><a class="reference internal" href="../../../../grpc.early_adopter.html#submodules">Submodules</a></li>
  33. <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>
  34. <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>
  35. <li class="toctree-l4"><a class="reference internal" href="../../../../grpc.early_adopter.html#module-grpc.early_adopter">Module contents</a></li>
  36. </ul>
  37. </li>
  38. <li class="toctree-l3"><a class="reference internal" href="../../../../grpc.framework.html">grpc.framework package</a><ul>
  39. <li class="toctree-l4"><a class="reference internal" href="../../../../grpc.framework.html#subpackages">Subpackages</a></li>
  40. <li class="toctree-l4"><a class="reference internal" href="../../../../grpc.framework.html#module-grpc.framework">Module contents</a></li>
  41. </ul>
  42. </li>
  43. </ul>
  44. </li>
  45. <li class="toctree-l2"><a class="reference internal" href="../../../../grpc.html#module-grpc">Module contents</a></li>
  46. </ul>
  47. </li>
  48. </ul>
  49. </div>
  50. &nbsp;
  51. </nav>
  52. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  53. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  54. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  55. <a href="../../../../index.html">grpcio</a>
  56. </nav>
  57. <div class="wy-nav-content">
  58. <div class="rst-content">
  59. <div role="navigation" aria-label="breadcrumbs navigation">
  60. <ul class="wy-breadcrumbs">
  61. <li><a href="../../../../index.html">Docs</a> &raquo;</li>
  62. <li><a href="../../../index.html">Module code</a> &raquo;</li>
  63. <li>grpc.framework.common.cardinality</li>
  64. <li class="wy-breadcrumbs-aside">
  65. </li>
  66. </ul>
  67. <hr/>
  68. </div>
  69. <div role="main" class="document">
  70. <h1>Source code for grpc.framework.common.cardinality</h1><div class="highlight"><pre>
  71. <span class="c"># Copyright 2015, Google Inc.</span>
  72. <span class="c"># All rights reserved.</span>
  73. <span class="c">#</span>
  74. <span class="c"># Redistribution and use in source and binary forms, with or without</span>
  75. <span class="c"># modification, are permitted provided that the following conditions are</span>
  76. <span class="c"># met:</span>
  77. <span class="c">#</span>
  78. <span class="c"># * Redistributions of source code must retain the above copyright</span>
  79. <span class="c"># notice, this list of conditions and the following disclaimer.</span>
  80. <span class="c"># * Redistributions in binary form must reproduce the above</span>
  81. <span class="c"># copyright notice, this list of conditions and the following disclaimer</span>
  82. <span class="c"># in the documentation and/or other materials provided with the</span>
  83. <span class="c"># distribution.</span>
  84. <span class="c"># * Neither the name of Google Inc. nor the names of its</span>
  85. <span class="c"># contributors may be used to endorse or promote products derived from</span>
  86. <span class="c"># this software without specific prior written permission.</span>
  87. <span class="c">#</span>
  88. <span class="c"># THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span>
  89. <span class="c"># &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span>
  90. <span class="c"># LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span>
  91. <span class="c"># A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span>
  92. <span class="c"># OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span>
  93. <span class="c"># SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span>
  94. <span class="c"># LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span>
  95. <span class="c"># DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span>
  96. <span class="c"># THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
  97. <span class="c"># (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span>
  98. <span class="c"># OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
  99. <span class="sd">&quot;&quot;&quot;Defines an enum for classifying RPC methods by streaming semantics.&quot;&quot;&quot;</span>
  100. <span class="kn">import</span> <span class="nn">enum</span>
  101. <span class="nd">@enum.unique</span>
  102. <div class="viewcode-block" id="Cardinality"><a class="viewcode-back" href="../../../../grpc.framework.common.html#grpc.framework.common.cardinality.Cardinality">[docs]</a><span class="k">class</span> <span class="nc">Cardinality</span><span class="p">(</span><span class="n">enum</span><span class="o">.</span><span class="n">Enum</span><span class="p">):</span>
  103. <span class="sd">&quot;&quot;&quot;Describes the streaming semantics of an RPC method.&quot;&quot;&quot;</span>
  104. <span class="n">UNARY_UNARY</span> <span class="o">=</span> <span class="s">&#39;request-unary/response-unary&#39;</span>
  105. <span class="n">UNARY_STREAM</span> <span class="o">=</span> <span class="s">&#39;request-unary/response-streaming&#39;</span>
  106. <span class="n">STREAM_UNARY</span> <span class="o">=</span> <span class="s">&#39;request-streaming/response-unary&#39;</span>
  107. <span class="n">STREAM_STREAM</span> <span class="o">=</span> <span class="s">&#39;request-streaming/response-streaming&#39;</span></div>
  108. </pre></div>
  109. </div>
  110. <footer>
  111. <hr/>
  112. <div role="contentinfo">
  113. <p>
  114. &copy; Copyright 2015, Author.
  115. </p>
  116. </div>
  117. 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>.
  118. </footer>
  119. </div>
  120. </div>
  121. </section>
  122. </div>
  123. <script type="text/javascript">
  124. var DOCUMENTATION_OPTIONS = {
  125. URL_ROOT:'../../../../',
  126. VERSION:'0.10.0a0',
  127. COLLAPSE_INDEX:false,
  128. FILE_SUFFIX:'.html',
  129. HAS_SOURCE: true
  130. };
  131. </script>
  132. <script type="text/javascript" src="../../../../_static/jquery.js"></script>
  133. <script type="text/javascript" src="../../../../_static/underscore.js"></script>
  134. <script type="text/javascript" src="../../../../_static/doctools.js"></script>
  135. <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
  136. <script type="text/javascript">
  137. jQuery(function () {
  138. SphinxRtdTheme.StickyNav.enable();
  139. });
  140. </script>
  141. </body>
  142. </html>