/** * Circuit breaker response */ export type BreakerResponse = { data?: T; error?: string; }; /** * Circuit breaker interface */ export interface Breaker { exec: (promise: () => Promise>) => Promise>; pause: () => void; state: () => States; } /** * Circuit breaker options */ export type BreakerOptions = { failureThreshold: number; successThreshold: number; timeout: number; }; /** * Circuit breaker states */ export type States = "green" | "yellow" | "red" | "paused"; /** * Circuit breaker utility * * @param name - circuit name * @param opts - options * @returns a new circuit breaker */ export declare const breaker: (name: string, opts?: BreakerOptions) => Breaker; //# sourceMappingURL=breaker.d.ts.map