123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811 |
- <!DOCTYPE html>
- <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
- <head>
- <meta charset="utf-8">
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>grpc.framework.interfaces.base package — grpcio 1.2.0 documentation</title>
-
-
-
-
-
-
-
-
-
-
-
-
- <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
-
-
-
- <link rel="index" title="Index"
- href="genindex.html"/>
- <link rel="search" title="Search" href="search.html"/>
- <link rel="top" title="grpcio 1.2.0 documentation" href="index.html"/>
- <link rel="up" title="grpc.framework.interfaces package" href="grpc.framework.interfaces.html"/>
- <link rel="next" title="grpc.framework.interfaces.face package" href="grpc.framework.interfaces.face.html"/>
- <link rel="prev" title="grpc.framework.interfaces package" href="grpc.framework.interfaces.html"/>
-
- <script src="_static/js/modernizr.min.js"></script>
- </head>
- <body class="wy-body-for-nav" role="document">
-
- <div class="wy-grid-for-nav">
-
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
- <div class="wy-side-scroll">
- <div class="wy-side-nav-search">
-
-
- <a href="index.html" class="icon icon-home"> grpcio
-
-
- </a>
-
-
-
- <div class="version">
- 1.2.0
- </div>
-
-
-
- <div role="search">
- <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
- <input type="text" name="q" placeholder="Search docs" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
-
- </div>
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-
-
-
-
-
-
- <p class="caption"><span class="caption-text">Contents:</span></p>
- <ul class="current">
- <li class="toctree-l1 current"><a class="reference internal" href="grpc.html">grpc package</a><ul class="current">
- <li class="toctree-l2 current"><a class="reference internal" href="grpc.html#subpackages">Subpackages</a><ul class="current">
- <li class="toctree-l3"><a class="reference internal" href="grpc.beta.html">grpc.beta package</a></li>
- <li class="toctree-l3 current"><a class="reference internal" href="grpc.framework.html">grpc.framework package</a><ul class="current">
- <li class="toctree-l4 current"><a class="reference internal" href="grpc.framework.html#subpackages">Subpackages</a></li>
- <li class="toctree-l4"><a class="reference internal" href="grpc.framework.html#module-grpc.framework">Module contents</a></li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="toctree-l2"><a class="reference internal" href="grpc.html#module-grpc">Module contents</a></li>
- </ul>
- </li>
- <li class="toctree-l1"><a class="reference internal" href="grpc.html#glossary">Glossary</a></li>
- </ul>
-
-
- </div>
- </div>
- </nav>
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
-
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
- <a href="index.html">grpcio</a>
-
- </nav>
-
- <div class="wy-nav-content">
- <div class="rst-content">
-
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
-
- <li><a href="index.html">Docs</a> »</li>
-
- <li><a href="grpc.html">grpc package</a> »</li>
-
- <li><a href="grpc.framework.html">grpc.framework package</a> »</li>
-
- <li><a href="grpc.framework.interfaces.html">grpc.framework.interfaces package</a> »</li>
-
- <li>grpc.framework.interfaces.base package</li>
-
-
- <li class="wy-breadcrumbs-aside">
-
-
- <a href="_sources/grpc.framework.interfaces.base.rst.txt" rel="nofollow"> View page source</a>
-
-
- </li>
-
- </ul>
-
- <hr/>
- </div>
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
- <div itemprop="articleBody">
-
- <div class="section" id="grpc-framework-interfaces-base-package">
- <h1>grpc.framework.interfaces.base package<a class="headerlink" href="#grpc-framework-interfaces-base-package" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="submodules">
- <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
- </div>
- <div class="section" id="module-grpc.framework.interfaces.base.base">
- <span id="grpc-framework-interfaces-base-base-module"></span><h2>grpc.framework.interfaces.base.base module<a class="headerlink" href="#module-grpc.framework.interfaces.base.base" title="Permalink to this headline">¶</a></h2>
- <p>The base interface of RPC Framework.</p>
- <p>Implementations of this interface support the conduct of “operations”:
- exchanges between two distinct ends of an arbitrary number of data payloads
- and metadata such as a name for the operation, initial and terminal metadata
- in each direction, and flow control. These operations may be used for transfers
- of data, remote procedure calls, status indication, or anything else
- applications choose.</p>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Completion">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">Completion</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Completion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Completion" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>An aggregate of the values exchanged upon operation completion.</p>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Completion.terminal_metadata">
- <code class="descname">terminal_metadata</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Completion.terminal_metadata" title="Permalink to this definition">¶</a></dt>
- <dd><p>A terminal metadata value for the operaton.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Completion.code">
- <code class="descname">code</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Completion.code" title="Permalink to this definition">¶</a></dt>
- <dd><p>A code value for the operation.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Completion.message">
- <code class="descname">message</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Completion.message" title="Permalink to this definition">¶</a></dt>
- <dd><p>A message value for the operation.</p>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.End">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">End</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#End"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.End" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>Common type for entry-point objects on both sides of an operation.</p>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.End.add_idle_action">
- <code class="descname">add_idle_action</code><span class="sig-paren">(</span><em>action</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#End.add_idle_action"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.End.add_idle_action" title="Permalink to this definition">¶</a></dt>
- <dd><p>Adds an action to be called when this End has no ongoing operations.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>action</strong> – A callable that accepts no arguments.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.End.operate">
- <code class="descname">operate</code><span class="sig-paren">(</span><em>group</em>, <em>method</em>, <em>subscription</em>, <em>timeout</em>, <em>initial_metadata=None</em>, <em>payload=None</em>, <em>completion=None</em>, <em>protocol_options=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#End.operate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.End.operate" title="Permalink to this definition">¶</a></dt>
- <dd><p>Commences an operation.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>group</strong> – The group identifier of the invoked operation.</li>
- <li><strong>method</strong> – The method identifier of the invoked operation.</li>
- <li><strong>subscription</strong> – A Subscription to which the results of the operation will be
- passed.</li>
- <li><strong>timeout</strong> – A length of time in seconds to allow for the operation.</li>
- <li><strong>initial_metadata</strong> – An initial metadata value to be sent to the other side
- of the operation. May be None if the initial metadata will be later
- passed via the returned operator or if there will be no initial metadata
- passed at all.</li>
- <li><strong>payload</strong> – An initial payload for the operation.</li>
- <li><strong>completion</strong> – A Completion value indicating the end of transmission to the
- other side of the operation.</li>
- <li><strong>protocol_options</strong> – A value specified by the provider of a Base interface
- implementation affording custom state and behavior.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
- <dt>A pair of objects affording information about the operation and action</dt>
- <dd><p class="first last">continuing the operation. The first element of the returned pair is an
- OperationContext for the operation and the second element of the
- returned pair is an Operator to which operation values not passed in
- this call should later be passed.</p>
- </dd>
- </dl>
- </p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.End.operation_stats">
- <code class="descname">operation_stats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#End.operation_stats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.End.operation_stats" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reports the number of terminated operations broken down by outcome.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
- <dt>A dictionary from Outcome.Kind value to an integer identifying the number</dt>
- <dd>of operations that terminated with that outcome kind.</dd>
- </dl>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.End.start">
- <code class="descname">start</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#End.start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.End.start" title="Permalink to this definition">¶</a></dt>
- <dd><p>Starts this object’s service of operations.</p>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.End.stop">
- <code class="descname">stop</code><span class="sig-paren">(</span><em>grace</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#End.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.End.stop" title="Permalink to this definition">¶</a></dt>
- <dd><p>Stops this object’s service of operations.</p>
- <p>This object will refuse service of new operations as soon as this method is
- called but operations under way at the time of the call may be given a
- grace period during which they are allowed to finish.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>grace</strong> – A duration of time in seconds to allow ongoing operations to
- terminate before being forcefully terminated by the stopping of this
- End. May be zero to terminate all ongoing operations and immediately
- stop.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
- <dt>A threading.Event that will be set to indicate all operations having</dt>
- <dd>terminated and this End having completely stopped. The returned event
- may not be set until after the full grace period (if some ongoing
- operation continues for the full length of the period) or it may be set
- much sooner (if for example this End had no operations in progress at
- the time its stop method was called).</dd>
- </dl>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- <dl class="exception">
- <dt id="grpc.framework.interfaces.base.base.NoSuchMethodError">
- <em class="property">exception </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">NoSuchMethodError</code><span class="sig-paren">(</span><em>code</em>, <em>details</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#NoSuchMethodError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.NoSuchMethodError" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
- <p>Indicates that an unrecognized operation has been called.</p>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.NoSuchMethodError.code">
- <code class="descname">code</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.NoSuchMethodError.code" title="Permalink to this definition">¶</a></dt>
- <dd><p>A code value to communicate to the other side of the operation
- along with indication of operation termination. May be None.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.NoSuchMethodError.details">
- <code class="descname">details</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.NoSuchMethodError.details" title="Permalink to this definition">¶</a></dt>
- <dd><p>A details value to communicate to the other side of the
- operation along with indication of operation termination. May be None.</p>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.OperationContext">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">OperationContext</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#OperationContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.OperationContext" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>Provides operation-related information and action.</p>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.OperationContext.add_termination_callback">
- <code class="descname">add_termination_callback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#OperationContext.add_termination_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.OperationContext.add_termination_callback" title="Permalink to this definition">¶</a></dt>
- <dd><p>Adds a function to be called upon operation termination.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback</strong> – A callable to be passed an Outcome value on operation
- termination.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
- <dt>None if the operation has not yet terminated and the passed callback will</dt>
- <dd>later be called when it does terminate, or if the operation has already
- terminated an Outcome value describing the operation termination and the
- passed callback will not be called as a result of this method call.</dd>
- </dl>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.OperationContext.cancel">
- <code class="descname">cancel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#OperationContext.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.OperationContext.cancel" title="Permalink to this definition">¶</a></dt>
- <dd><p>Cancels the operation if the operation has not yet terminated.</p>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.OperationContext.fail">
- <code class="descname">fail</code><span class="sig-paren">(</span><em>exception</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#OperationContext.fail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.OperationContext.fail" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates that the operation has failed.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>exception</strong> – An exception germane to the operation failure. May be None.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.OperationContext.outcome">
- <code class="descname">outcome</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#OperationContext.outcome"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.OperationContext.outcome" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates the operation’s outcome (or that the operation is ongoing).</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="docutils">
- <dt>None if the operation is still active or the Outcome value for the</dt>
- <dd>operation if it has terminated.</dd>
- </dl>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.OperationContext.time_remaining">
- <code class="descname">time_remaining</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#OperationContext.time_remaining"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.OperationContext.time_remaining" title="Permalink to this definition">¶</a></dt>
- <dd><p>Describes the length of allowed time remaining for the operation.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A nonnegative float indicating the length of allowed time in seconds
- remaining for the operation to complete before it is considered to have
- timed out. Zero is returned if the operation has terminated.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Operator">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">Operator</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Operator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Operator" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>An interface through which to participate in an operation.</p>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.Operator.advance">
- <code class="descname">advance</code><span class="sig-paren">(</span><em>initial_metadata=None</em>, <em>payload=None</em>, <em>completion=None</em>, <em>allowance=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Operator.advance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Operator.advance" title="Permalink to this definition">¶</a></dt>
- <dd><p>Progresses the operation.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
- <li><strong>initial_metadata</strong> – An initial metadata value. Only one may ever be
- communicated in each direction for an operation, and they must be
- communicated no later than either the first payload or the completion.</li>
- <li><strong>payload</strong> – A payload value.</li>
- <li><strong>completion</strong> – A Completion value. May only ever be non-None once in either
- direction, and no payloads may be passed after it has been communicated.</li>
- <li><strong>allowance</strong> – A positive integer communicating the number of additional
- payloads allowed to be passed by the remote side of the operation.</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Outcome">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">Outcome</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Outcome"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>The outcome of an operation.</p>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.kind">
- <code class="descname">kind</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.kind" title="Permalink to this definition">¶</a></dt>
- <dd><p>A Kind value coarsely identifying how the operation terminated.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.code">
- <code class="descname">code</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.code" title="Permalink to this definition">¶</a></dt>
- <dd><p>An application-specific code value or None if no such value was
- provided.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.details">
- <code class="descname">details</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.details" title="Permalink to this definition">¶</a></dt>
- <dd><p>An application-specific details value or None if no such value was
- provided.</p>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind">
- <em class="property">class </em><code class="descname">Kind</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Outcome.Kind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
- <p>Ways in which an operation can terminate.</p>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.CANCELLED">
- <code class="descname">CANCELLED</code><em class="property"> = 'cancelled'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.CANCELLED" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.COMPLETED">
- <code class="descname">COMPLETED</code><em class="property"> = 'completed'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.COMPLETED" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.EXPIRED">
- <code class="descname">EXPIRED</code><em class="property"> = 'expired'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.EXPIRED" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.LOCAL_FAILURE">
- <code class="descname">LOCAL_FAILURE</code><em class="property"> = 'local failure'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.LOCAL_FAILURE" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.LOCAL_SHUTDOWN">
- <code class="descname">LOCAL_SHUTDOWN</code><em class="property"> = 'local shutdown'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.LOCAL_SHUTDOWN" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.RECEPTION_FAILURE">
- <code class="descname">RECEPTION_FAILURE</code><em class="property"> = 'reception failure'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.RECEPTION_FAILURE" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.REMOTE_FAILURE">
- <code class="descname">REMOTE_FAILURE</code><em class="property"> = 'remote failure'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.REMOTE_FAILURE" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.REMOTE_SHUTDOWN">
- <code class="descname">REMOTE_SHUTDOWN</code><em class="property"> = 'remote shutdown'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.REMOTE_SHUTDOWN" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Outcome.Kind.TRANSMISSION_FAILURE">
- <code class="descname">TRANSMISSION_FAILURE</code><em class="property"> = 'transmission failure'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Outcome.Kind.TRANSMISSION_FAILURE" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.ProtocolReceiver">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">ProtocolReceiver</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#ProtocolReceiver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.ProtocolReceiver" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>A means of receiving protocol values during an operation.</p>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.ProtocolReceiver.context">
- <code class="descname">context</code><span class="sig-paren">(</span><em>protocol_context</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#ProtocolReceiver.context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.ProtocolReceiver.context" title="Permalink to this definition">¶</a></dt>
- <dd><p>Accepts the protocol context object for the operation.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>protocol_context</strong> – The protocol context object for the operation.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Servicer">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">Servicer</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Servicer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Servicer" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>Interface for service implementations.</p>
- <dl class="method">
- <dt id="grpc.framework.interfaces.base.base.Servicer.service">
- <code class="descname">service</code><span class="sig-paren">(</span><em>group</em>, <em>method</em>, <em>context</em>, <em>output_operator</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Servicer.service"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Servicer.service" title="Permalink to this definition">¶</a></dt>
- <dd><p>Services an operation.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>group</strong> – The group identifier of the operation to be serviced.</li>
- <li><strong>method</strong> – The method identifier of the operation to be serviced.</li>
- <li><strong>context</strong> – An OperationContext object affording contextual information and
- actions.</li>
- <li><strong>output_operator</strong> – An Operator that will accept output values of the
- operation.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><dl class="docutils">
- <dt>A Subscription via which this object may or may not accept more values of</dt>
- <dd><p class="first last">the operation.</p>
- </dd>
- </dl>
- </p>
- </td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
- <li><a class="reference internal" href="#grpc.framework.interfaces.base.base.NoSuchMethodError" title="grpc.framework.interfaces.base.base.NoSuchMethodError"><code class="xref py py-exc docutils literal"><span class="pre">NoSuchMethodError</span></code></a> – If this Servicer does not handle operations with the
- given group and method.</li>
- <li><code class="xref py py-exc docutils literal"><span class="pre">abandonment.Abandoned</span></code> – If the operation has been aborted and there no
- longer is any reason to service the operation.</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Subscription">
- <em class="property">class </em><code class="descclassname">grpc.framework.interfaces.base.base.</code><code class="descname">Subscription</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Subscription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
- <p>Describes customer code’s interest in values from the other side.</p>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.kind">
- <code class="descname">kind</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.kind" title="Permalink to this definition">¶</a></dt>
- <dd><p>A Kind value describing the overall kind of this value.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.termination_callback">
- <code class="descname">termination_callback</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.termination_callback" title="Permalink to this definition">¶</a></dt>
- <dd><p>A callable to be passed the Outcome associated with
- the operation after it has terminated. Must be non-None if kind is
- Kind.TERMINATION_ONLY. Must be None otherwise.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.allowance">
- <code class="descname">allowance</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.allowance" title="Permalink to this definition">¶</a></dt>
- <dd><p>A callable behavior that accepts positive integers representing
- the number of additional payloads allowed to be passed to the other side
- of the operation. Must be None if kind is Kind.FULL. Must not be None
- otherwise.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.operator">
- <code class="descname">operator</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.operator" title="Permalink to this definition">¶</a></dt>
- <dd><p>An Operator to be passed values from the other side of the
- operation. Must be non-None if kind is Kind.FULL. Must be None otherwise.</p>
- </dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.protocol_receiver">
- <code class="descname">protocol_receiver</code><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.protocol_receiver" title="Permalink to this definition">¶</a></dt>
- <dd><p>A ProtocolReceiver to be passed protocol objects as they
- become available during the operation. Must be non-None if kind is
- Kind.FULL.</p>
- </dd></dl>
- <dl class="class">
- <dt id="grpc.framework.interfaces.base.base.Subscription.Kind">
- <em class="property">class </em><code class="descname">Kind</code><a class="reference internal" href="_modules/grpc/framework/interfaces/base/base.html#Subscription.Kind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.Kind" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></code></p>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.Kind.FULL">
- <code class="descname">FULL</code><em class="property"> = 'full'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.Kind.FULL" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.Kind.NONE">
- <code class="descname">NONE</code><em class="property"> = 'none'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.Kind.NONE" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="attribute">
- <dt id="grpc.framework.interfaces.base.base.Subscription.Kind.TERMINATION_ONLY">
- <code class="descname">TERMINATION_ONLY</code><em class="property"> = 'termination only'</em><a class="headerlink" href="#grpc.framework.interfaces.base.base.Subscription.Kind.TERMINATION_ONLY" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- </dd></dl>
- </dd></dl>
- </div>
- <div class="section" id="module-grpc.framework.interfaces.base.utilities">
- <span id="grpc-framework-interfaces-base-utilities-module"></span><h2>grpc.framework.interfaces.base.utilities module<a class="headerlink" href="#module-grpc.framework.interfaces.base.utilities" title="Permalink to this headline">¶</a></h2>
- <p>Utilities for use with the base interface of RPC Framework.</p>
- <dl class="function">
- <dt id="grpc.framework.interfaces.base.utilities.completion">
- <code class="descclassname">grpc.framework.interfaces.base.utilities.</code><code class="descname">completion</code><span class="sig-paren">(</span><em>terminal_metadata</em>, <em>code</em>, <em>message</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/utilities.html#completion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.utilities.completion" title="Permalink to this definition">¶</a></dt>
- <dd><p>Creates a base.Completion aggregating the given operation values.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>terminal_metadata</strong> – A terminal metadata value for an operaton.</li>
- <li><strong>code</strong> – A code value for an operation.</li>
- <li><strong>message</strong> – A message value for an operation.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A base.Completion aggregating the given operation values.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="function">
- <dt id="grpc.framework.interfaces.base.utilities.full_subscription">
- <code class="descclassname">grpc.framework.interfaces.base.utilities.</code><code class="descname">full_subscription</code><span class="sig-paren">(</span><em>operator</em>, <em>protocol_receiver</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grpc/framework/interfaces/base/utilities.html#full_subscription"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#grpc.framework.interfaces.base.utilities.full_subscription" title="Permalink to this definition">¶</a></dt>
- <dd><p>Creates a “full” base.Subscription for the given base.Operator.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>operator</strong> – A base.Operator to be used in an operation.</li>
- <li><strong>protocol_receiver</strong> – A base.ProtocolReceiver to be used in an operation.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><dl class="docutils">
- <dt>A base.Subscription of kind base.Subscription.Kind.FULL wrapping the given</dt>
- <dd><p class="first last">base.Operator and base.ProtocolReceiver.</p>
- </dd>
- </dl>
- </p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </div>
- <div class="section" id="module-grpc.framework.interfaces.base">
- <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grpc.framework.interfaces.base" title="Permalink to this headline">¶</a></h2>
- </div>
- </div>
- </div>
- <div class="articleComments">
-
- </div>
- </div>
- <footer>
-
- <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-
- <a href="grpc.framework.interfaces.face.html" class="btn btn-neutral float-right" title="grpc.framework.interfaces.face package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
-
-
- <a href="grpc.framework.interfaces.html" class="btn btn-neutral" title="grpc.framework.interfaces package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
-
- </div>
-
- <hr/>
- <div role="contentinfo">
- <p>
- © Copyright 2016, The gRPC Authors.
- </p>
- </div>
- 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>.
- </footer>
- </div>
- </div>
- </section>
- </div>
-
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT:'./',
- VERSION:'1.2.0',
- COLLAPSE_INDEX:false,
- FILE_SUFFIX:'.html',
- HAS_SOURCE: true,
- SOURCELINK_SUFFIX: '.txt'
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
-
-
-
- <script type="text/javascript" src="_static/js/theme.js"></script>
-
-
-
- <script type="text/javascript">
- jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
- });
- </script>
-
- </body>
- </html>
|