Versions in this module Expand all Collapse all v1 v1.0.0 Apr 28, 2016 Changes in this version + const GC_SIZE + type LeakyBucket struct + Fill float64 + Lastupdate time.Time + LeakInterval time.Duration + Now func() time.Time + Size uint16 + func NewLeakyBucket(size uint16, leakInterval time.Duration) *LeakyBucket + func (b *LeakyBucket) DrainedAt() time.Time + func (b *LeakyBucket) Pour(amount uint16) bool + func (b *LeakyBucket) Serialise() *LeakyBucketSer + func (b *LeakyBucket) TimeSinceLastUpdate() time.Duration + func (b *LeakyBucket) TimeToDrain() time.Duration + type LeakyBucketSer struct + Fill float64 + Lastupdate time.Time + LeakInterval time.Duration + Size uint16 + func (b *LeakyBucketSer) DeSerialise() *LeakyBucket + type Memory struct + func NewMemory() *Memory + func (m *Memory) GarbageCollect() + func (m *Memory) GetBucketFor(key string) (*LeakyBucket, error) + func (m *Memory) SetBucketFor(key string, bucket LeakyBucket) error + type Storage interface + GetBucketFor func(string) (*LeakyBucket, error) + SetBucketFor func(string, LeakyBucket) error