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(ctx context.Context, label string, count float64) (ok bool, waitTime time.Duration, remaining float64, current float64)
Take(ctx context.Context, label string, count float64) (ok bool, waitTime time.Duration, remaining float64, current float64)
Return(ctx context.Context, 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.