|
|
@ -184,6 +184,16 @@ class RpcContext(object): |
|
|
|
""" |
|
|
|
""" |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
|
|
|
|
def protocol_context(self): |
|
|
|
|
|
|
|
"""Accesses a custom object specified by an implementation provider. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
|
|
|
|
A value specified by the provider of a Face interface implementation |
|
|
|
|
|
|
|
affording custom state and behavior. |
|
|
|
|
|
|
|
""" |
|
|
|
|
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Call(RpcContext): |
|
|
|
class Call(RpcContext): |
|
|
|
"""Invocation-side utility object for an RPC.""" |
|
|
|
"""Invocation-side utility object for an RPC.""" |
|
|
@ -354,7 +364,8 @@ class UnaryUnaryMultiCallable(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def __call__( |
|
|
|
def __call__( |
|
|
|
self, request, timeout, metadata=None, with_call=False): |
|
|
|
self, request, timeout, metadata=None, with_call=False, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Synchronously invokes the underlying RPC. |
|
|
|
"""Synchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -364,6 +375,8 @@ class UnaryUnaryMultiCallable(object): |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
to the reponse. |
|
|
|
to the reponse. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
@ -375,7 +388,7 @@ class UnaryUnaryMultiCallable(object): |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def future(self, request, timeout, metadata=None): |
|
|
|
def future(self, request, timeout, metadata=None, protocol_options=None): |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -383,6 +396,8 @@ class UnaryUnaryMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
@ -395,7 +410,7 @@ class UnaryUnaryMultiCallable(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event( |
|
|
|
def event( |
|
|
|
self, request, receiver, abortion_callback, timeout, |
|
|
|
self, request, receiver, abortion_callback, timeout, |
|
|
|
metadata=None): |
|
|
|
metadata=None, protocol_options=None): |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -406,6 +421,8 @@ class UnaryUnaryMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A Call for the RPC. |
|
|
|
A Call for the RPC. |
|
|
@ -418,7 +435,7 @@ class UnaryStreamMultiCallable(object): |
|
|
|
__metaclass__ = abc.ABCMeta |
|
|
|
__metaclass__ = abc.ABCMeta |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def __call__(self, request, timeout, metadata=None): |
|
|
|
def __call__(self, request, timeout, metadata=None, protocol_options=None): |
|
|
|
"""Invokes the underlying RPC. |
|
|
|
"""Invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -426,6 +443,8 @@ class UnaryStreamMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
@ -437,7 +456,7 @@ class UnaryStreamMultiCallable(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event( |
|
|
|
def event( |
|
|
|
self, request, receiver, abortion_callback, timeout, |
|
|
|
self, request, receiver, abortion_callback, timeout, |
|
|
|
metadata=None): |
|
|
|
metadata=None, protocol_options=None): |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -448,6 +467,8 @@ class UnaryStreamMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A Call object for the RPC. |
|
|
|
A Call object for the RPC. |
|
|
@ -462,7 +483,7 @@ class StreamUnaryMultiCallable(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def __call__( |
|
|
|
def __call__( |
|
|
|
self, request_iterator, timeout, metadata=None, |
|
|
|
self, request_iterator, timeout, metadata=None, |
|
|
|
with_call=False): |
|
|
|
with_call=False, protocol_options=None): |
|
|
|
"""Synchronously invokes the underlying RPC. |
|
|
|
"""Synchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -472,6 +493,8 @@ class StreamUnaryMultiCallable(object): |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
to the reponse. |
|
|
|
to the reponse. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
@ -483,7 +506,8 @@ class StreamUnaryMultiCallable(object): |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def future(self, request_iterator, timeout, metadata=None): |
|
|
|
def future( |
|
|
|
|
|
|
|
self, request_iterator, timeout, metadata=None, protocol_options=None): |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -491,6 +515,8 @@ class StreamUnaryMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
@ -502,7 +528,8 @@ class StreamUnaryMultiCallable(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event( |
|
|
|
def event( |
|
|
|
self, receiver, abortion_callback, timeout, metadata=None): |
|
|
|
self, receiver, abortion_callback, timeout, metadata=None, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -512,6 +539,8 @@ class StreamUnaryMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A single object that is both a Call object for the RPC and a |
|
|
|
A single object that is both a Call object for the RPC and a |
|
|
@ -525,7 +554,8 @@ class StreamStreamMultiCallable(object): |
|
|
|
__metaclass__ = abc.ABCMeta |
|
|
|
__metaclass__ = abc.ABCMeta |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def __call__(self, request_iterator, timeout, metadata=None): |
|
|
|
def __call__( |
|
|
|
|
|
|
|
self, request_iterator, timeout, metadata=None, protocol_options=None): |
|
|
|
"""Invokes the underlying RPC. |
|
|
|
"""Invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -533,6 +563,8 @@ class StreamStreamMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
@ -543,7 +575,8 @@ class StreamStreamMultiCallable(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event( |
|
|
|
def event( |
|
|
|
self, receiver, abortion_callback, timeout, metadata=None): |
|
|
|
self, receiver, abortion_callback, timeout, metadata=None, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
"""Asynchronously invokes the underlying RPC. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -553,6 +586,8 @@ class StreamStreamMultiCallable(object): |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
metadata: A metadata value to be passed to the service-side of |
|
|
|
the RPC. |
|
|
|
the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A single object that is both a Call object for the RPC and a |
|
|
|
A single object that is both a Call object for the RPC and a |
|
|
@ -646,7 +681,7 @@ class GenericStub(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def blocking_unary_unary( |
|
|
|
def blocking_unary_unary( |
|
|
|
self, group, method, request, timeout, metadata=None, |
|
|
|
self, group, method, request, timeout, metadata=None, |
|
|
|
with_call=False): |
|
|
|
with_call=False, protocol_options=None): |
|
|
|
"""Invokes a unary-request-unary-response method. |
|
|
|
"""Invokes a unary-request-unary-response method. |
|
|
|
|
|
|
|
|
|
|
|
This method blocks until either returning the response value of the RPC |
|
|
|
This method blocks until either returning the response value of the RPC |
|
|
@ -661,6 +696,8 @@ class GenericStub(object): |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
to the reponse. |
|
|
|
to the reponse. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
@ -673,7 +710,8 @@ class GenericStub(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def future_unary_unary( |
|
|
|
def future_unary_unary( |
|
|
|
self, group, method, request, timeout, metadata=None): |
|
|
|
self, group, method, request, timeout, metadata=None, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Invokes a unary-request-unary-response method. |
|
|
|
"""Invokes a unary-request-unary-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -682,6 +720,8 @@ class GenericStub(object): |
|
|
|
request: The request value for the RPC. |
|
|
|
request: The request value for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
@ -693,7 +733,8 @@ class GenericStub(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def inline_unary_stream( |
|
|
|
def inline_unary_stream( |
|
|
|
self, group, method, request, timeout, metadata=None): |
|
|
|
self, group, method, request, timeout, metadata=None, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Invokes a unary-request-stream-response method. |
|
|
|
"""Invokes a unary-request-stream-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -702,6 +743,8 @@ class GenericStub(object): |
|
|
|
request: The request value for the RPC. |
|
|
|
request: The request value for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
@ -713,7 +756,7 @@ class GenericStub(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def blocking_stream_unary( |
|
|
|
def blocking_stream_unary( |
|
|
|
self, group, method, request_iterator, timeout, metadata=None, |
|
|
|
self, group, method, request_iterator, timeout, metadata=None, |
|
|
|
with_call=False): |
|
|
|
with_call=False, protocol_options=None): |
|
|
|
"""Invokes a stream-request-unary-response method. |
|
|
|
"""Invokes a stream-request-unary-response method. |
|
|
|
|
|
|
|
|
|
|
|
This method blocks until either returning the response value of the RPC |
|
|
|
This method blocks until either returning the response value of the RPC |
|
|
@ -728,6 +771,8 @@ class GenericStub(object): |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
with_call: Whether or not to include return a Call for the RPC in addition |
|
|
|
to the reponse. |
|
|
|
to the reponse. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
|
The response value for the RPC, and a Call for the RPC if with_call was |
|
|
@ -740,7 +785,8 @@ class GenericStub(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def future_stream_unary( |
|
|
|
def future_stream_unary( |
|
|
|
self, group, method, request_iterator, timeout, metadata=None): |
|
|
|
self, group, method, request_iterator, timeout, metadata=None, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Invokes a stream-request-unary-response method. |
|
|
|
"""Invokes a stream-request-unary-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -749,6 +795,8 @@ class GenericStub(object): |
|
|
|
request_iterator: An iterator that yields request values for the RPC. |
|
|
|
request_iterator: An iterator that yields request values for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
|
An object that is both a Call for the RPC and a future.Future. In the |
|
|
@ -760,7 +808,8 @@ class GenericStub(object): |
|
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def inline_stream_stream( |
|
|
|
def inline_stream_stream( |
|
|
|
self, group, method, request_iterator, timeout, metadata=None): |
|
|
|
self, group, method, request_iterator, timeout, metadata=None, |
|
|
|
|
|
|
|
protocol_options=None): |
|
|
|
"""Invokes a stream-request-stream-response method. |
|
|
|
"""Invokes a stream-request-stream-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -769,6 +818,8 @@ class GenericStub(object): |
|
|
|
request_iterator: An iterator that yields request values for the RPC. |
|
|
|
request_iterator: An iterator that yields request values for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
|
An object that is both a Call for the RPC and an iterator of response |
|
|
@ -780,7 +831,7 @@ class GenericStub(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event_unary_unary( |
|
|
|
def event_unary_unary( |
|
|
|
self, group, method, request, receiver, abortion_callback, timeout, |
|
|
|
self, group, method, request, receiver, abortion_callback, timeout, |
|
|
|
metadata=None): |
|
|
|
metadata=None, protocol_options=None): |
|
|
|
"""Event-driven invocation of a unary-request-unary-response method. |
|
|
|
"""Event-driven invocation of a unary-request-unary-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -792,6 +843,8 @@ class GenericStub(object): |
|
|
|
in the event of RPC abortion. |
|
|
|
in the event of RPC abortion. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A Call for the RPC. |
|
|
|
A Call for the RPC. |
|
|
@ -801,7 +854,7 @@ class GenericStub(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event_unary_stream( |
|
|
|
def event_unary_stream( |
|
|
|
self, group, method, request, receiver, abortion_callback, timeout, |
|
|
|
self, group, method, request, receiver, abortion_callback, timeout, |
|
|
|
metadata=None): |
|
|
|
metadata=None, protocol_options=None): |
|
|
|
"""Event-driven invocation of a unary-request-stream-response method. |
|
|
|
"""Event-driven invocation of a unary-request-stream-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -813,6 +866,8 @@ class GenericStub(object): |
|
|
|
in the event of RPC abortion. |
|
|
|
in the event of RPC abortion. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A Call for the RPC. |
|
|
|
A Call for the RPC. |
|
|
@ -822,7 +877,7 @@ class GenericStub(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event_stream_unary( |
|
|
|
def event_stream_unary( |
|
|
|
self, group, method, receiver, abortion_callback, timeout, |
|
|
|
self, group, method, receiver, abortion_callback, timeout, |
|
|
|
metadata=None): |
|
|
|
metadata=None, protocol_options=None): |
|
|
|
"""Event-driven invocation of a unary-request-unary-response method. |
|
|
|
"""Event-driven invocation of a unary-request-unary-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -833,6 +888,8 @@ class GenericStub(object): |
|
|
|
in the event of RPC abortion. |
|
|
|
in the event of RPC abortion. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A pair of a Call object for the RPC and a stream.Consumer to which the |
|
|
|
A pair of a Call object for the RPC and a stream.Consumer to which the |
|
|
@ -843,7 +900,7 @@ class GenericStub(object): |
|
|
|
@abc.abstractmethod |
|
|
|
@abc.abstractmethod |
|
|
|
def event_stream_stream( |
|
|
|
def event_stream_stream( |
|
|
|
self, group, method, receiver, abortion_callback, timeout, |
|
|
|
self, group, method, receiver, abortion_callback, timeout, |
|
|
|
metadata=None): |
|
|
|
metadata=None, protocol_options=None): |
|
|
|
"""Event-driven invocation of a unary-request-stream-response method. |
|
|
|
"""Event-driven invocation of a unary-request-stream-response method. |
|
|
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
Args: |
|
|
@ -854,6 +911,8 @@ class GenericStub(object): |
|
|
|
in the event of RPC abortion. |
|
|
|
in the event of RPC abortion. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
timeout: A duration of time in seconds to allow for the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
metadata: A metadata value to be passed to the service-side of the RPC. |
|
|
|
|
|
|
|
protocol_options: A value specified by the provider of a Face interface |
|
|
|
|
|
|
|
implementation affording custom state and behavior. |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
|
|
Returns: |
|
|
|
A pair of a Call object for the RPC and a stream.Consumer to which the |
|
|
|
A pair of a Call object for the RPC and a stream.Consumer to which the |
|
|
|