Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doer ¶
type Doer struct {
// contains filtered or unexported fields
}
Doer limits an action to be executed at most once within a specified period. It is intended for managing events that occur frequently, but instead of an action being taken for every event, the action should be executed at most once within a given period of time.
Doer takes a function to execute, doFn, which is called every time the specified period has elapsed with the number of events and the period.
Click to show internal directories.
Click to hide internal directories.