import { IBackoff, IRetryBackoffContext } from 'cockatiel'; import { Context } from 'egg'; export declare const runWithRetry: (maxAttempts: number, fn: () => T | Promise, backoff?: IBackoff>) => Promise; export declare const runInBackgroundWithRetry: (ctx: Context, maxAttempts: number, fn: () => T | Promise, logError?: boolean, backoff?: IBackoff>) => void; export declare const retry: (maxAttempts: number, logError?: boolean, backoff?: IBackoff>) => (_: any, __: string, descriptor: PropertyDescriptor) => void;