Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Count ¶
type Count struct {
// contains filtered or unexported fields
}
a simple increase and decrease request limitation.
type CountThrottling ¶
type CountThrottling struct {
// contains filtered or unexported fields
}
count throttling provide the combined functionality of throttling and count. It will have a count of current jobs that must be decreased AND the throttling based on time
func NewCountThrottling ¶
func NewCountThrottling(concurrency uint, coolDown time.Duration, maxQueue uint, queueFullError error) *CountThrottling
create new throttling request limitation
func (*CountThrottling) Close ¶
func (t *CountThrottling) Close() error
func (*CountThrottling) Current ¶
func (t *CountThrottling) Current() uint
func (*CountThrottling) Decrease ¶
func (t *CountThrottling) Decrease()
func (*CountThrottling) Exec ¶
func (t *CountThrottling) Exec(cb func(dec chan struct{})) error
type Throttling ¶
type Throttling struct {
// contains filtered or unexported fields
}
func NewThrottling ¶
func NewThrottling(concurrency uint, coolDown time.Duration, maxQueue uint, queueFullError error) *Throttling
create new throttling request limitation
func (*Throttling) Close ¶
func (t *Throttling) Close() error
func (*Throttling) Exec ¶
func (t *Throttling) Exec(cb func()) error
Click to show internal directories.
Click to hide internal directories.