Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct { baseservice.BaseService // contains filtered or unexported fields }
func NewLimiter ¶
func NewLimiter(archetype *baseservice.Archetype, waitDuration time.Duration) *Limiter
NewLimiter creates a new Limiter, calling the NotifyFunc no more than once per waitDuration. The function must be fast as it is called within a mutex.
func (*Limiter) ShouldTrigger ¶
type NotifyFunc ¶
type NotifyFunc func(name string)
Click to show internal directories.
Click to hide internal directories.