module documentation
Idempotency key interceptor for gRPC aio clients.
This module provides functionality to automatically add idempotency keys to gRPC client calls, ensuring that operations can be safely retried without causing duplicate side effects on the server.
The interceptor adds a unique UUID4 key to the 'x-idempotency-key' header for each call that doesn't already have one.
| Class | |
gRPC client interceptor that adds idempotency keys to unary-unary calls. |
| Function | add |
Add a new idempotency key to the provided metadata. |
| Function | ensure |
Ensure an idempotency key is present in the metadata. |
| Function | new |
Generate a new idempotency key. |
| Constant | HEADER |
The gRPC metadata header name used for idempotency keys. |
| Type Variable | |
Undocumented |
| Type Variable | |
Undocumented |
| Variable | log |
Undocumented |
Add a new idempotency key to the provided metadata.
| Parameters | |
metadata:Metadata | GRPCMetadata | The metadata object to add the key to. |
Ensure an idempotency key is present in the metadata.
If no idempotency key exists or it's empty, a new one is added.
| Parameters | |
metadata:Metadata | GRPCMetadata | The metadata object to check and potentially modify. |