Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter interface {
Allow() bool
AllowN(t time.Time, n int) bool
Burst() int
Limit() rate.Limit
Reserve() Reservation
ReserveN(t time.Time, n int) Reservation
SetBurst(newBurst int)
SetBurstAt(t time.Time, newBurst int)
SetLimit(newLimit rate.Limit)
SetLimitAt(t time.Time, newLimit rate.Limit)
Tokens() float64
TokensAt(t time.Time) float64
Wait(ctx context.Context) (err error)
WaitN(ctx context.Context, n int) (err error)
}
Click to show internal directories.
Click to hide internal directories.