InMemoryWebhookRateLimiter constructor

InMemoryWebhookRateLimiter({
  1. int maxRequests = 60,
  2. Duration window = const Duration(minutes: 1),
  3. int maxTrackedKeys = 4096,
})

Implementation

InMemoryWebhookRateLimiter({
  this.maxRequests = 60,
  this.window = const Duration(minutes: 1),
  this.maxTrackedKeys = 4096,
}) {
  if (maxRequests < 1 || window <= Duration.zero || maxTrackedKeys < 1) {
    throw ArgumentError('Invalid webhook rate limit.');
  }
}