Closes the throtller.
initialize a throttler for use.
Withdraw tokens from the bucket.
reports whether open the throttler is open.
there are two variants to the throttler. In the first (and default) variant, the tokens ballance must be able to fully cover the current request. The second variant allows a request to proceed even if there is not enough tokens at the moment (overdraw), so long as all previous debt has been repayed.
Main throttler implementation
Implements <a href="https://en.wikipedia.org/wiki/Token_bucket">Token Bucket</a> QoS. Tokens are deposited into a bucket at a fixed rate. Consumers request withdrawl of tokens from the bucket. If the bucket does not have enough tokens, the request to withdraw is paused until such time as the bucket, again, has enough to allow the request to move forward.
The bucket size controls the burst rate, i.e. - the amount of tokens that can be withdrawn without wait after a long quiet period.
The throttler is strict first-come first-serve.