RetryConfig constructor
const
RetryConfig({
- int maxAttempts = 4,
- Duration initial = const Duration(milliseconds: 100),
- Duration max = const Duration(seconds: 30),
- Duration minDelay = Duration.zero,
- double multiplier = 2.0,
- double decorrelationFactor = 3.0,
- RetryStrategy strategy = RetryStrategy.full,
- bool honorRetryAfter = true,
- bool allowNonIdempotent = false,
- Set<
Code> retryableCodes = defaultRetryableCodes, - bool isRetryable(
- ConnectException error
- double jitterSource()?,
- Future<
void> sleep(- Duration delay
Builds a RetryConfig with RFC 0006 defaults.
Implementation
const RetryConfig({
this.maxAttempts = 4,
this.initial = const Duration(milliseconds: 100),
this.max = const Duration(seconds: 30),
this.minDelay = Duration.zero,
this.multiplier = 2.0,
this.decorrelationFactor = 3.0,
this.strategy = RetryStrategy.full,
this.honorRetryAfter = true,
this.allowNonIdempotent = false,
this.retryableCodes = defaultRetryableCodes,
this.isRetryable,
this.jitterSource,
this.sleep,
});