ResilienceConfig class

Configuration for network resilience, failure handling, and statistical analysis.

This struct controls the "brain" of the engine: how it handles noise, how it reacts to failure, and how it calculates jitter.

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
Duration (ms) the engine waits before attempting a "Half-Open" probe.
final
circuitBreakerThreshold int
Number of consecutive failures before the "Circuit Breaker" opens.
final
criticalPacketLossPrecent double
Critical packet loss percentage (0.0 - 100.0).
final
hashCode int
The hash code for this object.
no setteroverride
jitterThresholdPercent double
Percentage threshold for jitter classification.
final
numJitterSamples int
Number of packets/samples to send per target for statistical analysis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stabilityThershold int
Minimum stability score (0-100) required for a 'Stable' rating.
final
strategy CheckStrategy
The evaluation strategy (Race vs Consensus) for multi-target checks.
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 with modified resilience parameters.
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>
Balanced default resilience configuration.
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 custom `ResilienceConfig`.