Skip to content

Commit

Permalink
Update providers/tokenbucket/limiter.go
Browse files Browse the repository at this point in the history
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
  • Loading branch information
MalloZup and bwplotka authored Jan 29, 2021
1 parent 6046c8b commit 0bb8795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/tokenbucket/limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type TokenBucketInterceptor struct {
tokenBucket *ratelimit.Bucket
}

// Limit Implement Limiter interface
// Limit implements Limiter interface.
func (r *TokenBucketInterceptor) Limit(_ context.Context) error {
// Take one token per request. This call doesn't block.
tokenRes := r.tokenBucket.TakeAvailable(1)
Expand Down

0 comments on commit 0bb8795

Please sign in to comment.