Struct BreakDurationGeneratorArguments
- Namespace
- Polly.CircuitBreaker
- Assembly
- Polly.Core.dll
Represents arguments used to generate a dynamic break duration for a circuit breaker.
public readonly struct BreakDurationGeneratorArguments
- Inherited Members
Constructors
BreakDurationGeneratorArguments(double, int, ResilienceContext, int)
Initializes a new instance of the BreakDurationGeneratorArguments struct.
public BreakDurationGeneratorArguments(double failureRate, int failureCount, ResilienceContext context, int halfOpenAttempts)
Parameters
failureRate
doubleThe failure rate at which the circuit breaker should trip. It represents the ratio of failed actions to the total executed actions.
failureCount
intThe number of failures that have occurred. This count is used to determine if the failure threshold has been reached.
context
ResilienceContextThe resilience context providing additional information about the execution state and failures.
halfOpenAttempts
intThe number of half-open attempts.
Properties
Context
Gets the context that provides additional information about the resilience operation.
public ResilienceContext Context { get; }
Property Value
FailureCount
Gets the count of failures that have occurred.
public int FailureCount { get; }
Property Value
FailureRate
Gets the failure rate that represents the ratio of failures to total actions.
public double FailureRate { get; }
Property Value
HalfOpenAttempts
Gets the number of half-open attempts.
public int HalfOpenAttempts { get; }