Public Member Functions | |
grpc.RpcMethodHandler | intercept_service (self, Callable[[grpc.HandlerCallDetails], Awaitable[grpc.RpcMethodHandler]] continuation, grpc.HandlerCallDetails handler_call_details) |
Affords intercepting incoming RPCs on the service-side. This is an EXPERIMENTAL API.
Definition at line 48 of file aio/_interceptor.py.
grpc.RpcMethodHandler grpc.aio._interceptor.ServerInterceptor.intercept_service | ( | self, | |
Callable[[grpc.HandlerCallDetails], Awaitable[grpc.RpcMethodHandler]] | continuation, | ||
grpc.HandlerCallDetails | handler_call_details | ||
) |
Intercepts incoming RPCs before handing them over to a handler. Args: continuation: A function that takes a HandlerCallDetails and proceeds to invoke the next interceptor in the chain, if any, or the RPC handler lookup logic, with the call details passed as an argument, and returns an RpcMethodHandler instance if the RPC is considered serviced, or None otherwise. handler_call_details: A HandlerCallDetails describing the RPC. Returns: An RpcMethodHandler with which the RPC may be serviced if the interceptor chooses to service this RPC, or None otherwise.
Definition at line 55 of file aio/_interceptor.py.