A simple but general purpose http Rate Limiter
$ go get -u github.com/mzampetakis/reili
Define your own identifier function
IdentifyVisitor(r *http.Request) (string, error)
following the interface that package reili
provides
type VisitorIdentifier interface {
IdentifyVisitor(r *http.Request) (string, error)
}
Create a rate limiter using reili.NewRateLimiter(reqPerSec, burstReq, visitorIdentifier)
and then limit your server's mux using your limiter.