CircuitBreakerInterceptor constructor
CircuitBreakerInterceptor({})
Implementation
CircuitBreakerInterceptor(
{this.failureThreshold = 5,
this.breakDuration = const Duration(seconds: 30),
DateTime Function()? clock})
: _clock = clock ?? DateTime.now {
if (failureThreshold < 1 || breakDuration <= Duration.zero) {
throw ArgumentError('Invalid circuit options.');
}
}