throttler
throttler copied to clipboard
pre-fill burst token bucket
this permits bursting to start immediately
i have an API with constraints -
50 calls per minute 2500 calls per day
i've modelled this with a throttle-fn for the per-minute constraint around a throttle-fn for the per-day constraint... problem is that even if i allow bursting on the per-day constraint i never get to use my 50 calls a minute without waiting for an age for the per-day constraint bucket to fill
this patch allows the per-day bucket to be pre-filled, so i can happily use my 50 calls per-minute until i've exhausted my per-day calls