Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDuplicateMessage is returned when a message has been duplicated. ErrDuplicateMessage = errors.New("duplicate initial message") )
Functions ¶
This section is empty.
Types ¶
type Debouncer ¶
type Debouncer struct {
// contains filtered or unexported fields
}
Debouncer makes sure messages with the same hash are not repeated.
func NewDebouncer ¶
NewDebouncer makes a Debouncer. Messages will only be stored in memory up until maxAge time, and once the same message has been received maxCount times it will be forgotten as well. maxCount is ignored when <= 0.
Click to show internal directories.
Click to hide internal directories.