Skip to content

Commit bd29ef9

Browse files
Jajanidzealdas
authored andcommitted
added references to Limiter docs for 0-1 behaviour
1 parent 8b4cce5 commit bd29ef9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

middleware/rate_limiter.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ type (
170170
/*
171171
NewRateLimiterMemoryStore returns an instance of RateLimiterMemoryStore with
172172
the provided rate (as req/s). The provided rate less than 1 will be treated as zero.
173+
Also rate between 0 and 1 will be treated as zero.
174+
for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit.
175+
173176
Burst and ExpiresIn will be set to default values.
174177
175178
Example (with 20 requests/sec):

0 commit comments

Comments
 (0)