Skip to content

Commit e90d146

Browse files
token bucket comments
1 parent df7ca5d commit e90d146

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/token_bucket.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ export class TokenBucket {
1818
}
1919
}
2020

21+
/**
22+
* @internal
23+
* The amount to deposit on successful operations, as defined in the backpressure specification.
24+
*/
2125
export const TOKEN_REFRESH_RATE = 0.1;
22-
export const INITIAL_SIZE = 1000;
26+
/**
27+
* @internal
28+
* The initial size of the token bucket, as defined in the backpressure specification.
29+
*/
30+
export const INITIAL_TOKEN_BUCKET_SIZE = 1000;
31+
/**
32+
* @internal
33+
* The cost of a retry, as defined in the backpressure specification.
34+
*/
2335
export const RETRY_COST = 1;

0 commit comments

Comments
 (0)