@bernierllc/retry-policy
Version:
Atomic retry policy utilities with exponential backoff and jitter
45 lines (39 loc) • 1.12 kB
text/typescript
/*
Copyright (c) 2025 Bernier LLC
This file is licensed to the client under a limited-use license.
The client may use and modify this code *only within the scope of the project it was delivered for*.
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
*/
// Export types
export type {
RetryPolicyOptions,
RetryPolicyResult,
JitterConfig,
BackoffConfig
} from './types';
// Export runtime configuration types and functions
export type {
RetryPolicyRuntimeConfig,
ConfigurationSource
} from './config/loadOptionalConfig';
export {
loadOptionalRetryPolicyConfig,
loadOptionalRetryPolicyConfigWithSources,
setGlobalRetryPolicyConfig,
getGlobalRetryPolicyConfig,
clearGlobalRetryPolicyConfig,
mergeConfigurations
} from './config/loadOptionalConfig';
// Export main class and functions
export {
RetryPolicy,
createRetryPolicy,
calculateRetryDelay,
shouldRetry
} from './retry-policy';
// Export constants
export {
DEFAULT_RETRY_OPTIONS,
DEFAULT_JITTER_CONFIG,
DEFAULT_BACKOFF_CONFIG
} from './retry-policy';