AlgorithmRateLimitStore class abstract interface

A RateLimitStore that also counts with other algorithms than the fixed window (Limit.slidingWindow, Limit.gcra).

Implemented types
Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → StateScope
no setterinherited

Methods

attempt(String key, int maxAttempts, Duration decay) → Future<RateLimitResult>
Records an attempt for key when under the limit.
inherited
attempts(String key, Duration decay) → Future<int>
Attempts counted in the current window.
inherited
attemptWith(RateLimitAlgorithm algorithm, String key, int maxAttempts, Duration decay) → Future<RateLimitResult>
Records an attempt for key under algorithm when under the limit.
availableIn(String key, int maxAttempts, Duration decay) → Future<Duration>
Time until an attempt is possible again (zero when not limited).
inherited
clear(String key) → Future<void>
inherited
flush() → Future<void>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
supports(RateLimitAlgorithm algorithm) → bool
Whether algorithm is counted as itself (else as a fixed window).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited