Public Member Functions | |
StreamUnaryCall | intercept_stream_unary (self, Callable[[ClientCallDetails, RequestType], StreamUnaryCall] continuation, ClientCallDetails client_call_details, RequestIterableType request_iterator) |
Affords intercepting stream-unary invocations.
Definition at line 176 of file aio/_interceptor.py.
StreamUnaryCall grpc.aio._interceptor.StreamUnaryClientInterceptor.intercept_stream_unary | ( | self, | |
Callable[[ClientCallDetails, RequestType], StreamUnaryCall] | continuation, | ||
ClientCallDetails | client_call_details, | ||
RequestIterableType | request_iterator | ||
) |
Affords intercepting stream-unary invocations.
Intercepts a stream-unary invocation asynchronously. Within the interceptor the usage of the call methods like `write` or even awaiting the call should be done carefully, since the caller could be expecting an untouched call, for example for start writing messages to it. Args: continuation: A coroutine that proceeds with the invocation by executing the next interceptor in the chain or invoking the actual RPC on the underlying Channel. It is the interceptor's responsibility to call it if it decides to move the RPC forward. The interceptor can use `call = await continuation(client_call_details, request_iterator)` to continue with the RPC. `continuation` returns the call to the RPC. client_call_details: A ClientCallDetails object describing the outgoing RPC. request_iterator: The request iterator that will produce requests for the RPC. Returns: The RPC Call. Raises: AioRpcError: Indicating that the RPC terminated with non-OK status. asyncio.CancelledError: Indicating that the RPC was canceled.
Definition at line 180 of file aio/_interceptor.py.