RetryConfig constructor

const RetryConfig({
  1. int maxAttempts = 4,
  2. Duration initial = const Duration(milliseconds: 100),
  3. Duration max = const Duration(seconds: 30),
  4. Duration minDelay = Duration.zero,
  5. double multiplier = 2.0,
  6. double decorrelationFactor = 3.0,
  7. RetryStrategy strategy = RetryStrategy.full,
  8. bool honorRetryAfter = true,
  9. bool allowNonIdempotent = false,
  10. Set<Code> retryableCodes = defaultRetryableCodes,
  11. bool isRetryable(
    1. ConnectException error
    )?,
  12. double jitterSource()?,
  13. Future<void> sleep(
    1. 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,
});