(config: IdempotencyConfig = {})
| 82 | private storageMethod: StorageMethod |
| 83 | |
| 84 | constructor(config: IdempotencyConfig = {}) { |
| 85 | this.config = { |
| 86 | ttlSeconds: config.ttlSeconds ?? DEFAULT_TTL, |
| 87 | namespace: config.namespace ?? 'default', |
| 88 | retryFailures: config.retryFailures ?? false, |
| 89 | storeResultBody: config.storeResultBody ?? true, |
| 90 | } |
| 91 | this.storageMethod = config.forceStorage ?? getStorageMethod() |
| 92 | logger.info(`IdempotencyService using ${this.storageMethod} storage`, { |
| 93 | namespace: this.config.namespace, |
| 94 | forced: Boolean(config.forceStorage), |
| 95 | }) |
| 96 | } |
| 97 | |
| 98 | private normalizeKey( |
| 99 | provider: string, |
nothing calls this directly
no test coverage detected