grpc_health_checking.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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 Health Checking &#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 Reflection" href="grpc_reflection.html" />
  16. <link rel="prev" title="gRPC Channelz" href="grpc_channelz.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 current"><a class="current reference internal" href="#">gRPC Health Checking</a><ul>
  32. <li class="toctree-l2"><a class="reference internal" href="#module-contents">Module Contents</a></li>
  33. </ul>
  34. </li>
  35. <li class="toctree-l1"><a class="reference internal" href="grpc_reflection.html">gRPC Reflection</a></li>
  36. <li class="toctree-l1"><a class="reference internal" href="grpc_status.html">gRPC Status</a></li>
  37. <li class="toctree-l1"><a class="reference internal" href="grpc_testing.html">gRPC Testing</a></li>
  38. <li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li>
  39. </ul>
  40. <div class="relations">
  41. <h3>Related Topics</h3>
  42. <ul>
  43. <li><a href="index.html">Documentation overview</a><ul>
  44. <li>Previous: <a href="grpc_channelz.html" title="previous chapter">gRPC Channelz</a></li>
  45. <li>Next: <a href="grpc_reflection.html" title="next chapter">gRPC Reflection</a></li>
  46. </ul></li>
  47. </ul>
  48. </div>
  49. <div id="searchbox" style="display: none" role="search">
  50. <h3 id="searchlabel">Quick search</h3>
  51. <div class="searchformwrapper">
  52. <form class="search" action="search.html" method="get">
  53. <input type="text" name="q" aria-labelledby="searchlabel" />
  54. <input type="submit" value="Go" />
  55. </form>
  56. </div>
  57. </div>
  58. <script>$('#searchbox').show(0);</script>
  59. </div>
  60. </div>
  61. <div class="documentwrapper">
  62. <div class="bodywrapper">
  63. <div class="body" role="main">
  64. <div class="section" id="grpc-health-checking">
  65. <h1>gRPC Health Checking<a class="headerlink" href="#grpc-health-checking" title="Permalink to this headline">¶</a></h1>
  66. <div class="section" id="module-contents">
  67. <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalink to this headline">¶</a></h2>
  68. <dl class="py class">
  69. <dt id="grpc_health.v1.health.HealthServicer">
  70. <em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">grpc_health.v1.health.</span></code><code class="sig-name descname"><span class="pre">HealthServicer</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">experimental_non_blocking</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">experimental_thread_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_health/v1/health.html#HealthServicer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_health.v1.health.HealthServicer" title="Permalink to this definition">¶</a></dt>
  71. <dd><p>Servicer handling RPCs for service statuses.</p>
  72. <dl class="py method">
  73. <dt id="grpc_health.v1.health.HealthServicer.Check">
  74. <code class="sig-name descname"><span class="pre">Check</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</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_health/v1/health.html#HealthServicer.Check"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_health.v1.health.HealthServicer.Check" title="Permalink to this definition">¶</a></dt>
  75. <dd><p>If the requested service is unknown, the call will fail with status
  76. NOT_FOUND.</p>
  77. </dd></dl>
  78. <dl class="py method">
  79. <dt id="grpc_health.v1.health.HealthServicer.Watch">
  80. <code class="sig-name descname"><span class="pre">Watch</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">send_response_callback</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_health/v1/health.html#HealthServicer.Watch"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_health.v1.health.HealthServicer.Watch" title="Permalink to this definition">¶</a></dt>
  81. <dd><p>Performs a watch for the serving status of the requested service.
  82. The server will immediately send back a message indicating the current
  83. serving status. It will then subsequently send a new message whenever
  84. the service’s serving status changes.</p>
  85. <p>If the requested service is unknown when the call is received, the
  86. server will send a message setting the serving status to
  87. SERVICE_UNKNOWN but will <em>not</em> terminate the call. If at some
  88. future point, the serving status of the service becomes known, the
  89. server will send a new message with the service’s serving status.</p>
  90. <p>If the call terminates with status UNIMPLEMENTED, then clients
  91. should assume this method is not supported and should not retry the
  92. call. If the call terminates with any other status (including OK),
  93. clients should retry the call with appropriate exponential backoff.</p>
  94. </dd></dl>
  95. <dl class="py method">
  96. <dt id="grpc_health.v1.health.HealthServicer.enter_graceful_shutdown">
  97. <code class="sig-name descname"><span class="pre">enter_graceful_shutdown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc_health/v1/health.html#HealthServicer.enter_graceful_shutdown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_health.v1.health.HealthServicer.enter_graceful_shutdown" title="Permalink to this definition">¶</a></dt>
  98. <dd><p>Permanently sets the status of all services to NOT_SERVING.</p>
  99. <p>This should be invoked when the server is entering a graceful shutdown
  100. period. After this method is invoked, future attempts to set the status
  101. of a service will be ignored.</p>
  102. <p>This is an EXPERIMENTAL API.</p>
  103. </dd></dl>
  104. <dl class="py method">
  105. <dt id="grpc_health.v1.health.HealthServicer.set">
  106. <code class="sig-name descname"><span class="pre">set</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">service</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">status</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc_health/v1/health.html#HealthServicer.set"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grpc_health.v1.health.HealthServicer.set" title="Permalink to this definition">¶</a></dt>
  107. <dd><p>Sets the status of a service.</p>
  108. <dl class="field-list simple">
  109. <dt class="field-odd">Parameters</dt>
  110. <dd class="field-odd"><ul class="simple">
  111. <li><p><strong>service</strong> – string, the name of the service.</p></li>
  112. <li><p><strong>status</strong> – HealthCheckResponse.status enum value indicating the status of
  113. the service</p></li>
  114. </ul>
  115. </dd>
  116. </dl>
  117. </dd></dl>
  118. </dd></dl>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <div class="clearer"></div>
  125. </div>
  126. <div class="footer">
  127. &copy;2020, The gRPC Authors.
  128. |
  129. <a href="_sources/grpc_health_checking.rst.txt"
  130. rel="nofollow">Page source</a>
  131. </div>
  132. <script type="text/javascript">
  133. var _gaq = _gaq || [];
  134. _gaq.push(['_setAccount', 'UA-60127042-1']);
  135. _gaq.push(['_setDomainName', 'none']);
  136. _gaq.push(['_setAllowLinker', true]);
  137. _gaq.push(['_trackPageview']);
  138. (function() {
  139. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  140. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  141. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  142. })();
  143. </script>
  144. </body>
  145. </html>