Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiter ¶
type RateLimiter interface { Name() string TakeIfAvailable(label string, count float64) (ok bool, remaining float64, current float64) Take(label string, count float64) (ok bool, waitTime time.Duration, remaining float64, current float64) Return(label string, count float64) (remaining float64, current float64) SetPassThrough(passthrough bool) GetPassThrough() bool Close() error }
RateLimiter is a generic limiter interface.
Click to show internal directories.
Click to hide internal directories.