Documentation
¶
Index ¶
Constants ¶
View Source
const (
Fibonacci = "fibonacci"
Sequence = "sequence"
SkipAlgorithmKey = "SKIP_ALGORITHM"
NumberKey = "NUMBER"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterHandler ¶
type CounterHandler struct {
Skipper Skipper
sync.Mutex
// contains filtered or unexported fields
}
type Skipper ¶
type Skipper interface {
// Skip returns true if the message must be rejected
Skip(counter uint64) bool
}
Skipper represents the logic to apply to accept/reject events.
func SkipperAlgorithm ¶
func SkipperAlgorithm(algorithm string) Skipper
func SkipperAlgorithmWithCount ¶ added in v0.17.8
func SkipperAlgorithmWithCount(algorithm string, count uint64) Skipper
count is only used for SKIP_ALGORITHM=Sequence.
Click to show internal directories.
Click to hide internal directories.