gRPC  0.6.0
 All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | List of all members
grpc.framework.alpha.interfaces.StreamUnarySyncAsync Class Reference
Inheritance diagram for grpc.framework.alpha.interfaces.StreamUnarySyncAsync:
grpc.framework.alpha._reexport._StreamUnarySyncAsync

Public Member Functions

def __call__
 
def async
 

Detailed Description

Affords invoking a stream-unary RPC synchronously or asynchronously.
Values implementing this interface are directly callable and present an
"async" method. Both calls take an iterator of request values 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.

Member Function Documentation

def grpc.framework.alpha.interfaces.StreamUnarySyncAsync.__call__ (   self,
  request_iterator,
  timeout 
)
Synchronously invokes the underlying RPC.

Args:
  request_iterator: An iterator that yields request values 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.StreamUnarySyncAsync.async (   self,
  request_iterator,
  timeout 
)
Asynchronously invokes the underlying RPC.

Args:
  request_iterator: An iterator that yields request values 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.

The documentation for this class was generated from the following file: