Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketThrottler ¶
type BucketThrottler struct {
// contains filtered or unexported fields
}
BucketThrottler is implementation of token-bucket algorithm for rate-limiting
func NewBucketThrottler ¶
func NewBucketThrottler(limit int) *BucketThrottler
NewBucketThrottler create a new instance of BucketThrottler which limit
func NewBucketThrottlerBacklog ¶
func NewBucketThrottlerBacklog(limit int, backlog int, timeout time.Duration) *BucketThrottler
NewBucketThrottlerBacklog crete a new instance of Throttler which more configuration options
type NopThrottler ¶
type NopThrottler struct { }
NopThrottler is always return that you can perform given operation
func NewNopThrottler ¶
func NewNopThrottler(_ ...interface{}) *NopThrottler
NewNopThrottler create instance of NopThrottler
Click to show internal directories.
Click to hide internal directories.