CircuitBreakerConfig

data class CircuitBreakerConfig(val failureThreshold: Int = 5, val resetTimeout: Duration = 30.seconds, val halfOpenSuccessThreshold: Int = 2, val halfOpenMaxCalls: Int = 3)(source)

Configuration for circuit breaker behavior.

Constructors

Link copied to clipboard
constructor(failureThreshold: Int = 5, resetTimeout: Duration = 30.seconds, halfOpenSuccessThreshold: Int = 2, halfOpenMaxCalls: Int = 3)

Properties

Link copied to clipboard

Number of consecutive failures before opening the circuit (default: 5)

Link copied to clipboard

Maximum number of calls allowed in Half-Open state (default: 3)

Link copied to clipboard

Number of successes needed in Half-Open state to close circuit (default: 2)

Link copied to clipboard

Duration to wait before transitioning from Open to Half-Open (default: 30 seconds)