Versions in this module Expand all Collapse all v0 v0.2.1 Jul 9, 2015 v0.2.0 Jun 14, 2015 Changes in this version + func ChooseTokenBucketCapacity(rateHz float64, window time.Duration) (capacity uint64, err error) + func NewThrottledBucket(opThrottle Throttle, egressThrottle Throttle, wrapped gcs.Bucket) (b gcs.Bucket) + func ThrottledReader(ctx context.Context, r io.Reader, throttle Throttle) io.Reader + type MonotonicTime time.Duration + type Throttle interface + Capacity func() (c uint64) + Wait func(ctx context.Context, tokens uint64) (err error) + func NewThrottle(rateHz float64, capacity uint64) (t Throttle) + type TokenBucket interface + Capacity func() (c uint64) + CheckInvariants func() + Remove func(now MonotonicTime, tokens uint64) (sleepUntil MonotonicTime) + func NewTokenBucket(rateHz float64, capacity uint64) (tb TokenBucket)