RateLimit typedef

RateLimit = ({int maxAttempts, Duration timeframe})

A rolling rate limit which allows maxAttempts in the most recent timeframe.

Implementation

typedef RateLimit = ({int maxAttempts, Duration timeframe});