API Reference
Complete API reference for @nodelibraries/circuit-breaker.
Classes
- CircuitBreaker - Main class for managing circuit breakers
Enums
- CircuitBreakerLevel - Enum representing different levels of circuit breakers
Types
- Types - TypeScript types and interfaces
Quick Reference
CircuitBreaker
typescript
class CircuitBreaker {
constructor(eventHandlers?: EventHandlers);
execute<T>(params: CircuitBreakerParams<T>): Promise<T>;
getCircuitBreakerStats(): Record<string, any>;
}CircuitBreakerLevel
typescript
enum CircuitBreakerLevel {
Endpoint = 'Endpoint',
Service = 'Service',
Application = 'Application',
Database = 'Database',
External = 'External',
}