grpc_reflection.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>gRPC Reflection &#8212; gRPC Python 1.36.1 documentation</title>
  7. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
  9. <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  10. <script src="_static/jquery.js"></script>
  11. <script src="_static/underscore.js"></script>
  12. <script src="_static/doctools.js"></script>
  13. <link rel="index" title="Index" href="genindex.html" />
  14. <link rel="search" title="Search" href="search.html" />
  15. <link rel="next" title="gRPC Status" href="grpc_status.html" />
  16. <link rel="prev" title="gRPC Health Checking" href="grpc_health_checking.html" />
  17. <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  18. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
  19. </head><body>
  20. <div class="document">
  21. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  22. <div class="sphinxsidebarwrapper">
  23. <h1 class="logo"><a href="index.html">gRPC Python</a></h1>
  24. <p class="blurb">1.36.1</p>
  25. <h3>Navigation</h3>
  26. <p class="caption"><span class="caption-text">Contents:</span></p>
  27. <ul class="current">
  28. <li class="toctree-l1"><a class="reference internal" href="grpc.html">gRPC</a></li>
  29. <li class="toctree-l1"><a class="reference internal" href="grpc_asyncio.html">gRPC AsyncIO API</a></li>
  30. <li class="toctree-l1"><a class="reference internal" href="grpc_channelz.html">gRPC Channelz</a></li>
  31. <li class="toctree-l1"><a class="reference internal" href="grpc_health_checking.html">gRPC Health Checking</a></li>
  32. <li class="toctree-l1 current"><a class="current reference internal" href="#">gRPC Reflection</a><ul>
  33. <li class="toctree-l2"><a class="reference internal" href="#what-is-grpc-reflection">What is gRPC reflection?</a></li>
  34. <li class="toctree-l2"><a class="reference internal" href="#example">Example</a></li>
  35. <li class="toctree-l2"><a class="reference internal" href="#module-grpc_reflection.v1alpha.reflection">Module Contents</a></li>
  36. </ul>
  37. </li>
  38. <li class="toctree-l1"><a class="reference internal" href="grpc_status.html">gRPC Status</a></li>
  39. <li class="toctree-l1"><a class="reference internal" href="grpc_testing.html">gRPC Testing</a></li>
  40. <li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li>
  41. </ul>
  42. <div class="relations">
  43. <h3>Related Topics</h3>
  44. <ul>
  45. <li><a href="index.html">Documentation overview</a><ul>
  46. <li>Previous: <a href="grpc_health_checking.html" title="previous chapter">gRPC Health Checking</a></li>
  47. <li>Next: <a href="grpc_status.html" title="next chapter">gRPC Status</a></li>
  48. </ul></li>
  49. </ul>
  50. </div>
  51. <div id="searchbox" style="display: none" role="search">
  52. <h3 id="searchlabel">Quick search</h3>
  53. <div class="searchformwrapper">
  54. <form class="search" action="search.html" method="get">
  55. <input type="text" name="q" aria-labelledby="searchlabel" />
  56. <input type="submit" value="Go" />
  57. </form>
  58. </div>
  59. </div>
  60. <script>$('#searchbox').show(0);</script>
  61. </div>
  62. </div>
  63. <div class="documentwrapper">
  64. <div class="bodywrapper">
  65. <div class="body" role="main">
  66. <div class="section" id="grpc-reflection">
  67. <h1>gRPC Reflection<a class="headerlink" href="#grpc-reflection" title="Permalink to this headline">¶</a></h1>
  68. <div class="section" id="what-is-grpc-reflection">
  69. <h2>What is gRPC reflection?<a class="headerlink" href="#what-is-grpc-reflection" title="Permalink to this headline">¶</a></h2>
  70. <p>Check this out <a class="reference external" href="https://github.com/grpc/grpc/blob/master/doc/python/server_reflection.md">gRPC Python Server Reflection</a></p>
  71. </div>
  72. <div class="section" id="example">
  73. <h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
  74. <p>Refer to the GitHub <a class="reference external" href="https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server_with_reflection.py">reflection example</a></p>
  75. </div>
  76. <div class="section" id="module-grpc_reflection.v1alpha.reflection">
  77. <span id="module-contents"></span><h2>Module Contents<a class="headerlink" href="#module-grpc_reflection.v1alpha.reflection" title="Permalink to this headline">¶</a></h2>
  78. <p>Reference implementation for reflection in gRPC Python.</p>
  79. <dl class="py class">
  80. <dt id="grpc_reflection.v1alpha.reflection.ReflectionServicer">
  81. <em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">grpc_reflection.v1alpha.reflection.</span></code><code class="sig-name descname"><span class="pre">ReflectionServicer</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_names</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pool</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc_reflection/v1alpha/reflection.html#ReflectionServicer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_reflection.v1alpha.reflection.ReflectionServicer" title="Permalink to this definition">¶</a></dt>
  82. <dd><p>Servicer handling RPCs for service statuses.</p>
  83. <dl class="py method">
  84. <dt id="grpc_reflection.v1alpha.reflection.ReflectionServicer.ServerReflectionInfo">
  85. <code class="sig-name descname"><span class="pre">ServerReflectionInfo</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request_iterator</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc_reflection/v1alpha/reflection.html#ReflectionServicer.ServerReflectionInfo"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_reflection.v1alpha.reflection.ReflectionServicer.ServerReflectionInfo" title="Permalink to this definition">¶</a></dt>
  86. <dd><p>The reflection service is structured as a bidirectional stream, ensuring
  87. all related requests go to a single server.</p>
  88. </dd></dl>
  89. </dd></dl>
  90. <dl class="py function">
  91. <dt id="grpc_reflection.v1alpha.reflection.enable_server_reflection">
  92. <code class="sig-prename descclassname"><span class="pre">grpc_reflection.v1alpha.reflection.</span></code><code class="sig-name descname"><span class="pre">enable_server_reflection</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service_names</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">server</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pool</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc_reflection/v1alpha/reflection.html#enable_server_reflection"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_reflection.v1alpha.reflection.enable_server_reflection" title="Permalink to this definition">¶</a></dt>
  93. <dd><p>Enables server reflection on a server.</p>
  94. <dl class="field-list simple">
  95. <dt class="field-odd">Parameters</dt>
  96. <dd class="field-odd"><ul class="simple">
  97. <li><p><strong>service_names</strong> – Iterable of fully-qualified service names available.</p></li>
  98. <li><p><strong>server</strong> – grpc.Server to which reflection service will be added.</p></li>
  99. <li><p><strong>pool</strong> – DescriptorPool object to use (descriptor_pool.Default() if None).</p></li>
  100. </ul>
  101. </dd>
  102. </dl>
  103. </dd></dl>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="clearer"></div>
  110. </div>
  111. <div class="footer">
  112. &copy;2020, The gRPC Authors.
  113. |
  114. <a href="_sources/grpc_reflection.rst.txt"
  115. rel="nofollow">Page source</a>
  116. </div>
  117. <script type="text/javascript">
  118. var _gaq = _gaq || [];
  119. _gaq.push(['_setAccount', 'UA-60127042-1']);
  120. _gaq.push(['_setDomainName', 'none']);
  121. _gaq.push(['_setAllowLinker', true]);
  122. _gaq.push(['_trackPageview']);
  123. (function() {
  124. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  125. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  126. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  127. })();
  128. </script>
  129. </body>
  130. </html>