class documentation

class IdempotencyKeyInterceptor(UnaryUnaryClientInterceptor): (source)

View In Hierarchy

Add idempotency keys to unary-unary gRPC calls.

The idempotency key lets the server prevent duplicate operations.

Async Method intercept_unary_unary Add an idempotency key to a unary-unary gRPC call.
async def intercept_unary_unary(self, continuation: Callable[[ClientCallDetails, Req], UnaryUnaryCall | Res], client_call_details: ClientCallDetails, request: Req) -> UnaryUnaryCall | Res: (source) ΒΆ

Add an idempotency key to a unary-unary gRPC call.

Parameters
continuation:Callable[[ClientCallDetails, Req], UnaryUnaryCall | Res]The next interceptor in the chain or the actual call.
client_call_details:ClientCallDetailsDetails of the client call, including metadata.
request:ReqThe request payload.
Returns
UnaryUnaryCall | ResThe result of the gRPC call.