Documentation ¶ Index ¶ type Throttle func New() *Throttle func (t *Throttle) Dec(ops int) int func (t *Throttle) Delay() time.Duration func (t *Throttle) Ops() int func (t *Throttle) Update(ops int, until time.Time) *Throttle func (t *Throttle) Wait(cxt context.Context) (int, int) func (t *Throttle) WaitN(cxt context.Context, ops int) (int, int) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Throttle ¶ type Throttle struct { sync.Mutex // contains filtered or unexported fields } func New ¶ func New() *Throttle func (*Throttle) Dec ¶ func (t *Throttle) Dec(ops int) int func (*Throttle) Delay ¶ func (t *Throttle) Delay() time.Duration func (*Throttle) Ops ¶ func (t *Throttle) Ops() int func (*Throttle) Update ¶ func (t *Throttle) Update(ops int, until time.Time) *Throttle func (*Throttle) Wait ¶ func (t *Throttle) Wait(cxt context.Context) (int, int) func (*Throttle) WaitN ¶ func (t *Throttle) WaitN(cxt context.Context, ops int) (int, int) Source Files ¶ View all Source files throttle.go Click to show internal directories. Click to hide internal directories.