Skip to content

simple rate limiter: max N times during DURATION.

Notifications You must be signed in to change notification settings

SUN-XIN/ratelimiter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ratelimiter

simple rate limiter: max N times during DURATION.

example

rl := NewRateLimiter(5, time.Second)
for i := 0; i < 15; i++ {
  rl.CheckRate()
  // do something
}

About

simple rate limiter: max N times during DURATION.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages