// Create limiter with a rate of 100 per second.
limiter := rate.NewLimiter(100, time.Second)
for _ = range <-someChannel {
limiter.Take()
}
limiter.Stop()
-
Notifications
You must be signed in to change notification settings - Fork 0
Very simple Golang rate limiter
License
minitauros/go-rate-limiter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Very simple Golang rate limiter
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published