dco_decode_resilience_config method
Implementation
@protected
ResilienceConfig dco_decode_resilience_config(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List<dynamic>;
if (arr.length != 7)
throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
return ResilienceConfig(
strategy: dco_decode_check_strategy(arr[0]),
circuitBreakerThreshold: dco_decode_u_8(arr[1]),
circuitBreakerCooldownMs: dco_decode_u_64(arr[2]),
numJitterSamples: dco_decode_u_8(arr[3]),
jitterThresholdPercent: dco_decode_f_64(arr[4]),
stabilityThershold: dco_decode_u_8(arr[5]),
criticalPacketLossPrecent: dco_decode_f_32(arr[6]),
);
}