UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

12 lines (11 loc) 388 B
import { MAXIMUM_RETRY_DELAY } from "./constants"; export const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => { const getRetryCount = () => retryCount; const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay); const getRetryCost = () => retryCost; return { getRetryCount, getRetryDelay, getRetryCost, }; };