Skip to main content

Module bucket

Module bucket 

Source
Expand description

An atomic and shareable token bucket BUT with one caveat, it is without the clock component that is the refill is not taking into account any rate or time tracking.

This AtomicTokenBucket is used within a super::BandwidthPool to keep track of the available bandwidth.

It is refilled through an entity, the super::BandwidthRefiller, which is owned by an independent task built to refill this bucket at the appropriate time.

See the super documentation for more information on how these objects interact with each other.

Structsยง

AtomicTokenBucket ๐Ÿ”’
The atomic token bucket minus the clock component.