My implementation of (and small demo wrapper around) a distributed rate limiting library.
You should have a working Go environment and have $GOPATH/bin in your $PATH.
To download the source, compile, and install the demo binary, run:
go get github.com/jlucktay/rate-limit/...The source code will be located in $GOPATH/src/github.com/jlucktay/rate-limit/.
A newly-compiled jrl binary will be in $GOPATH/bin/.
Launching the demo server:
jrlHitting the server from another terminal session:
$ while true; do curl --silent --include localhost:8080 | head --lines 1; done
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
...