Update window docs
This commit is contained in:
parent
3760f68ccc
commit
2e2bf7c2ed
1 changed files with 9 additions and 0 deletions
|
@ -12,13 +12,22 @@ class RateLimitingWindow<User> {
|
||||||
final int pointsConsumed;
|
final int pointsConsumed;
|
||||||
|
|
||||||
/// The maximum amount of points allowed within a single window.
|
/// The maximum amount of points allowed within a single window.
|
||||||
|
///
|
||||||
|
/// This field is typically only set by the [RateLimiter] middleware,
|
||||||
|
/// and is therefore optional in the constructor.
|
||||||
final int pointLimit;
|
final int pointLimit;
|
||||||
|
|
||||||
/// The amount of points the user can consume before hitting the
|
/// The amount of points the user can consume before hitting the
|
||||||
/// rate limit for the current window.
|
/// rate limit for the current window.
|
||||||
|
///
|
||||||
|
/// This field is typically only set by the [RateLimiter] middleware,
|
||||||
|
/// and is therefore optional in the constructor.
|
||||||
final int remainingPoints;
|
final int remainingPoints;
|
||||||
|
|
||||||
/// The time at which the window will reset.
|
/// The time at which the window will reset.
|
||||||
|
///
|
||||||
|
/// This field is typically only set by the [RateLimiter] middleware,
|
||||||
|
/// and is therefore optional in the constructor.
|
||||||
final DateTime resetsAt;
|
final DateTime resetsAt;
|
||||||
|
|
||||||
RateLimitingWindow(this.user, this.start, this.pointsConsumed,
|
RateLimitingWindow(this.user, this.start, this.pointsConsumed,
|
||||||
|
|
Loading…
Reference in a new issue