You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'
.
Consider something like:
-- Redis script to implement a leaky bucket | |
-- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260 | |
-- (c) Florent CHAUVEAU <florent.chauveau@gmail.com> | |
local ts = tonumber(ARGV[1]) | |
local cps = tonumber(ARGV[2]) | |
local key = KEYS[1] | |
-- remove tokens < min (older than now() -1s) | |
local min = ts -1 |
-- Redis script to get the size of a token bucket | |
-- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260 | |
-- (c) Florent CHAUVEAU <florent.chauveau@gmail.com> | |
local ts = tonumber(ARGV[1]) | |
local key = KEYS[1] | |
-- remove tokens < min (older than now() -1s) | |
local min = ts -1 |
-- Redis script to add an event to a token bucket | |
-- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260 | |
-- (c) Florent CHAUVEAU <florent.chauveau@gmail.com> | |
local ts = tonumber(ARGV[1]) | |
-- set the token bucket to 1 second (rolling) | |
local min = ts -1 | |
-- iterate overs keys |