class documentation
class IdempotencyKeyInterceptor(UnaryUnaryClientInterceptor): (source)
gRPC client interceptor that adds idempotency keys to unary-unary calls.
This interceptor ensures that every gRPC call has an idempotency key in its metadata, which helps prevent duplicate operations on the server side.
| Async Method | intercept |
Intercept a unary-unary gRPC call and ensure idempotency key is present. |
async def intercept_unary_unary(self, continuation:
Callable[ [ ClientCallDetails, Req], UnaryUnaryCall | Res], client_call_details: ClientCallDetails, request: Req) -> UnaryUnaryCall | Res:
(source)
ΒΆ
Intercept a unary-unary gRPC call and ensure idempotency key is present.
| Parameters | |
continuation:Callable[ | The next interceptor in the chain or the actual call. |
clientClientCallDetails | Details of the client call, including metadata. |
request:Req | The request payload. |
| Returns | |
UnaryUnaryCall | Res | The result of the gRPC call. |