Documents for @litert/idempotency / Types / IManagerOptions
Interface: IManagerOptions<TData, TError>
Defined in: src/lib/Types.ts:166
The options for the idempotency manager.
Type Parameters
TData
TData
TError
TError
= Error
Properties
failureSerializer?
optional
failureSerializer:ISerializer
<TError
>
Defined in: src/lib/Types.ts:185
Serializer for failure results.
Default
DefaultFailureSerializer
storageAdapter
storageAdapter:
IStorageAdapter
Defined in: src/lib/Types.ts:171
The adapter used for storage operations
successSerializer?
optional
successSerializer:ISerializer
<TData
>
Defined in: src/lib/Types.ts:178
Serializer for successful results.
Default
DefaultSuccessSerializer
waitCallback?
optional
waitCallback:IWaitCallback
<TData
,TError
>
Defined in: src/lib/Types.ts:193
The callback to wait for the completion of an operation, if an idempotency record is pending.
You can implement this to handle cases where you want to create a custom waiting mechanism. Or just throw an error if you do not want to wait, enforcing the requester to retry.