import { ICircuitBreaker, CircuitBreakerOptions, CircuitBreakerState } from './interfaces'; /** * Circuit breaker implementation for preventing cascading failures */ export declare class CircuitBreaker implements ICircuitBreaker { private state; private readonly options; private monitoringInterval?; constructor(options?: Partial); execute(operation: () => Promise): Promise; getState(): CircuitBreakerState; forceOpen(): void; forceClose(): void; reset(): void; destroy(): void; private shouldReject; private executeWithTimeout; private onSuccess; private onFailure; private startMonitoring; private logMetrics; } /** * Circuit breaker manager for handling multiple circuit breakers */ export declare class CircuitBreakerManager { private circuitBreakers; private defaultOptions; constructor(defaultOptions?: Partial); getCircuitBreaker(name: string, options?: Partial): CircuitBreaker; executeWithCircuitBreaker(name: string, operation: () => Promise, options?: Partial): Promise; getStatus(name?: string): Record; forceOpen(name: string): void; forceClose(name: string): void; reset(name: string): void; resetAll(): void; destroy(): void; } /** * Decorator for adding circuit breaker protection to methods */ export declare function withCircuitBreaker(name: string, options?: Partial): (target: any, propertyName: string, descriptor: PropertyDescriptor) => PropertyDescriptor; export declare const circuitBreakerManager: CircuitBreakerManager; //# sourceMappingURL=circuitBreaker.d.ts.map