mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Updated RateLimiting (markdown)
parent
17af5985af
commit
1a0ca7c57e
@ -2,7 +2,7 @@
|
||||
|
||||
To limit the rate of operations per unit time, use a [time.Ticker](http://golang.org/pkg/time/#NewTicker).
|
||||
This works well for rates up to tens of operations per second.
|
||||
For higher rates, prefer a token bucket rate limiter (search godoc.org for
|
||||
For higher rates, prefer a token bucket rate limiter such as [golang.org/x/time/rate.Limiter](https://godoc.org/golang.org/x/time/rate) (also search godoc.org for
|
||||
[rate limit](http://godoc.org/?q=rate+limit)).
|
||||
|
||||
```go
|
||||
|
Loading…
x
Reference in New Issue
Block a user