ResilienceConfig class

Configuration for resilience, stability analysis, and performance tuning.

Available extensions

Constructors

ResilienceConfig({required CheckStrategy strategy, required int circuitBreakerThreshold, required BigInt circuitBreakerCooldownMs, required int numJitterSamples, required double jitterThresholdPercent, required int stabilityThershold, required double criticalPacketLossPrecent})
const

Properties

circuitBreakerCooldownMs BigInt
The cooldown period in milliseconds.
final
circuitBreakerThreshold int
The number of consecutive failures of essential targets before the circuit breaker opens.
final
criticalPacketLossPrecent double
The packet loss percentage above which the connection is marked as ConnectionQuality::Unstable.
final
hashCode int
The hash code for this object.
no setteroverride
jitterThresholdPercent double
The percentage of mean latency that the standard deviation must exceed to be flagged as high jitter.
final
numJitterSamples int
Number of samples to take for jitter and stability analysis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stabilityThershold int
The minimum stability score (0-100) required to avoid the 'Unstable' quality tag.
final
strategy CheckStrategy
The evaluation strategy to use when checking multiple targets.
final

Methods

copyWith({CheckStrategy? strategy, int? circuitBreakerThreshold, BigInt? circuitBreakerCooldownMs, int? numJitterSamples, double? jitterThresholdPercent, int? stabilityThershold, double? criticalPacketLossPrecent}) ResilienceConfig

Available on ResilienceConfig, provided by the ResilienceConfigCopyWith extension

Creates a copy of ResilienceConfig with the given fields replaced by the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

default_() Future<ResilienceConfig>
Provides a standard resilience configuration balanced for stability and speed.
newInstance({required CheckStrategy strategy, required int circuitBreakerThreshold, required BigInt circuitBreakerCooldownMs, required int numJitterSamples, required double jitterThresholdPercent, required int stabilityThershold, required double criticalPacketLossPrecent}) Future<ResilienceConfig>
Creates a new ResilienceConfig instance.