Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecRoutineWithInterval ¶
定期执行工作例程
Types ¶
type CountLimiter ¶
type CountLimiter struct { UpperLimit uint32 // the upper limit // contains filtered or unexported fields }
count limiter
func (*CountLimiter) IncrIfNotFull ¶
func (limit *CountLimiter) IncrIfNotFull() bool
if the count don't exceed the upper limit, incr the count return if incr the count
func (*CountLimiter) IsFull ¶
func (limit *CountLimiter) IsFull() bool
check if the count exceeds the upper limit
Click to show internal directories.
Click to hide internal directories.