UNPKG

@bernierllc/retry-policy

Version:

Atomic retry policy utilities with exponential backoff and jitter

29 lines (28 loc) 3.06 kB
"use strict"; /* 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_BACKOFF_CONFIG = exports.DEFAULT_JITTER_CONFIG = exports.DEFAULT_RETRY_OPTIONS = exports.shouldRetry = exports.calculateRetryDelay = exports.createRetryPolicy = exports.RetryPolicy = exports.mergeConfigurations = exports.clearGlobalRetryPolicyConfig = exports.getGlobalRetryPolicyConfig = exports.setGlobalRetryPolicyConfig = exports.loadOptionalRetryPolicyConfigWithSources = exports.loadOptionalRetryPolicyConfig = void 0; var loadOptionalConfig_1 = require("./config/loadOptionalConfig"); Object.defineProperty(exports, "loadOptionalRetryPolicyConfig", { enumerable: true, get: function () { return loadOptionalConfig_1.loadOptionalRetryPolicyConfig; } }); Object.defineProperty(exports, "loadOptionalRetryPolicyConfigWithSources", { enumerable: true, get: function () { return loadOptionalConfig_1.loadOptionalRetryPolicyConfigWithSources; } }); Object.defineProperty(exports, "setGlobalRetryPolicyConfig", { enumerable: true, get: function () { return loadOptionalConfig_1.setGlobalRetryPolicyConfig; } }); Object.defineProperty(exports, "getGlobalRetryPolicyConfig", { enumerable: true, get: function () { return loadOptionalConfig_1.getGlobalRetryPolicyConfig; } }); Object.defineProperty(exports, "clearGlobalRetryPolicyConfig", { enumerable: true, get: function () { return loadOptionalConfig_1.clearGlobalRetryPolicyConfig; } }); Object.defineProperty(exports, "mergeConfigurations", { enumerable: true, get: function () { return loadOptionalConfig_1.mergeConfigurations; } }); // Export main class and functions var retry_policy_1 = require("./retry-policy"); Object.defineProperty(exports, "RetryPolicy", { enumerable: true, get: function () { return retry_policy_1.RetryPolicy; } }); Object.defineProperty(exports, "createRetryPolicy", { enumerable: true, get: function () { return retry_policy_1.createRetryPolicy; } }); Object.defineProperty(exports, "calculateRetryDelay", { enumerable: true, get: function () { return retry_policy_1.calculateRetryDelay; } }); Object.defineProperty(exports, "shouldRetry", { enumerable: true, get: function () { return retry_policy_1.shouldRetry; } }); // Export constants var retry_policy_2 = require("./retry-policy"); Object.defineProperty(exports, "DEFAULT_RETRY_OPTIONS", { enumerable: true, get: function () { return retry_policy_2.DEFAULT_RETRY_OPTIONS; } }); Object.defineProperty(exports, "DEFAULT_JITTER_CONFIG", { enumerable: true, get: function () { return retry_policy_2.DEFAULT_JITTER_CONFIG; } }); Object.defineProperty(exports, "DEFAULT_BACKOFF_CONFIG", { enumerable: true, get: function () { return retry_policy_2.DEFAULT_BACKOFF_CONFIG; } }); //# sourceMappingURL=index.js.map