The function type being protected
OptionalhalfMaximum number of test attempts allowed in half-open state
OptionalmaxMaximum number of consecutive failures before tripping the circuit
OptionalonCallback invoked when the protected function throws an error
OptionalonCallback invoked when circuit breaker enters half-open state
OptionalonCallback invoked when circuit breaker resets (closes)
OptionalonCallback invoked when circuit breaker trips (opens)
OptionalresetTime in milliseconds to wait before testing recovery
OptionalshouldPredicate function to determine if an error should trip the circuit
Configuration options for circuit breaker behavior.