Table of Contents

Constructor CircuitBreakerPolicy

Namespace
LMKit.Agents.Resilience
Assembly
LM-Kit.NET.dll

CircuitBreakerPolicy(int, TimeSpan?, TimeSpan?)

Initializes a new instance of the CircuitBreakerPolicy class.

public CircuitBreakerPolicy(int failureThreshold = 5, TimeSpan? recoveryTime = null, TimeSpan? samplingWindow = null)

Parameters

failureThreshold int

Number of failures before opening the circuit.

recoveryTime TimeSpan?

Time to wait before attempting recovery.

samplingWindow TimeSpan?

Optional window for counting failures. If null, failures accumulate indefinitely until success.