<PackageReference Include="Polly.Core" Version="8.0.0-alpha.9" />

CircuitBreakerStrategyOptions<TResult>

The options for circuit breaker resilience strategy.
public TimeSpan BreakDuration { get; set; }

Gets or sets the duration of break the circuit will stay open before resetting.

public double FailureRatio { get; set; }

Gets or sets the failure-to-success ratio at which the circuit will break.

Gets or sets the manual control for the circuit breaker.

public int MinimumThroughput { get; set; }

Gets or sets the minimum throughput: this many actions or more must pass through the circuit in the time-slice, for statistics to be considered significant and the circuit-breaker to come into action.

public Func<OnCircuitClosedArguments<TResult>, ValueTask> OnClosed { get; set; }

Gets or sets the event that is raised when the circuit resets to a Closed state.

Gets or sets the event that is raised when when the circuit transitions to an HalfOpen state.

public Func<OnCircuitOpenedArguments<TResult>, ValueTask> OnOpened { get; set; }

Gets or sets the event that is raised when the circuit transitions to an Open state.

public TimeSpan SamplingDuration { get; set; }

Gets or sets the duration of the sampling over which failure ratios are assessed.

public Func<CircuitBreakerPredicateArguments<TResult>, ValueTask<bool>> ShouldHandle { get; set; }

Gets or sets a predicate that determines whether the outcome should be handled by the circuit breaker.

Gets or sets the state provider for the circuit breaker.

Initializes a new instance of the CircuitBreakerStrategyOptions<T> class.