rate limiter: update swagger documentation...
after adding the one_time_burst support to the
TokenBucket description.
@@ -438,9 +438,11 @@ definitions:
TokenBucket:
type: object
description:
- Defines a token bucket with a fixed size/capacity and refill_time.
+ Defines a token bucket with a maximum capacity (size), an initial burst size
+ (one_time_burst) and an interval for refilling purposes (refill_time).
The refill-rate is derived from size and refill_time, and it is the constant
- rate at which the tokens replenish.
+ rate at which the tokens replenish. The refill process only starts happening after
+ the initial burst budget is consumed.
Consumption from the token bucket is unbounded in speed which allows for bursts
bound in size by the amount of tokens available.
Once the token bucket is empty, consumption speed is bound by the refill_rate.
@@ -448,11 +450,16 @@ definitions:
size:
type: integer
format: int64
- description: The total number of tokens this bucket can hold
+ description: The total number of tokens this bucket can hold.
+ minimum: 0
+ one_time_burst:
+ type: integer
+ format: int64
+ description: The initial size of a token bucket.
minimum: 0
refill_time:
type: integer
format: int64
- description: The amount of milliseconds it takes for the bucket to refill
+ description: The amount of milliseconds it takes for the bucket to refill.
minimum: 0
