Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntervalLimiter ¶
type IntervalLimiter struct {
// contains filtered or unexported fields
}
IntervalLimiter ensures each allowed call is spaced by `interval`. It serializes concurrent callers: they will line up and each gets its own slot.
func NewIntervalLimiter ¶
func NewIntervalLimiter(interval time.Duration) *IntervalLimiter
Click to show internal directories.
Click to hide internal directories.