cardinality.html 7.5 KB

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