Public Member Functions | |
Union[ResponseIterableType, UnaryStreamCall] | intercept_unary_stream (self, Callable[[ClientCallDetails, RequestType], UnaryStreamCall] continuation, ClientCallDetails client_call_details, RequestType request) |
Affords intercepting unary-stream invocations.
Definition at line 139 of file aio/_interceptor.py.
Union[ResponseIterableType, UnaryStreamCall] grpc.aio._interceptor.UnaryStreamClientInterceptor.intercept_unary_stream | ( | self, | |
Callable[[ClientCallDetails, RequestType], UnaryStreamCall] | continuation, | ||
ClientCallDetails | client_call_details, | ||
RequestType | request | ||
) |
Affords intercepting unary-stream invocations.
Intercepts a unary-stream invocation asynchronously. The function could return the call object or an asynchronous iterator, in case of being an asyncrhonous iterator this will become the source of the reads done by the caller. 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)` to continue with the RPC. `continuation` returns the call to the RPC. client_call_details: A ClientCallDetails object describing the outgoing RPC. request: The request value for the RPC. Returns: The RPC Call or an asynchronous iterator. Raises: AioRpcError: Indicating that the RPC terminated with non-OK status. asyncio.CancelledError: Indicating that the RPC was canceled.
Definition at line 143 of file aio/_interceptor.py.