16 lines
516 B
JavaScript
16 lines
516 B
JavaScript
export const getRetryConfiguration = (runtimeConfig) => {
|
|
let _retryStrategy = runtimeConfig.retryStrategy;
|
|
return {
|
|
setRetryStrategy(retryStrategy) {
|
|
_retryStrategy = retryStrategy;
|
|
},
|
|
retryStrategy() {
|
|
return _retryStrategy;
|
|
},
|
|
};
|
|
};
|
|
export const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
|
|
const runtimeConfig = {};
|
|
runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
|
|
return runtimeConfig;
|
|
};
|