Public Member Functions | |
def | __call__ |
def | async |
Affords invoking a unary-unary RPC synchronously or asynchronously. Values implementing this interface are directly callable and present an "async" method. Both calls take a request value and a numeric timeout. Direct invocation of a value of this type invokes its associated RPC and blocks until the RPC's response is available. Calling the "async" method of a value of this type invokes its associated RPC and immediately returns a future.Future bound to the asynchronous execution of the RPC.
def grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.__call__ | ( | self, | |
request, | |||
timeout | |||
) |
Synchronously invokes the underlying RPC. Args: request: The request value for the RPC. timeout: A duration of time in seconds to allow for the RPC. Returns: The response value for the RPC. Raises: exceptions.RpcError: Indicating that the RPC was aborted.
def grpc.framework.alpha.interfaces.UnaryUnarySyncAsync.async | ( | self, | |
request, | |||
timeout | |||
) |
Asynchronously invokes the underlying RPC. Args: request: The request value for the RPC. timeout: A duration of time in seconds to allow for the RPC. Returns: A future.Future representing the RPC. In the event of RPC completion, the returned Future's result value will be the response value of the RPC. In the event of RPC abortion, the returned Future's exception value will be an exceptions.RpcError.