Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultSuppressionWindow = time.Minute DefaultSuppressionKeys = 4096 )
View Source
const DefaultRingCapacity = 20
Variables ¶
This section is empty.
Functions ¶
func SanitizeText ¶
Types ¶
type SuppressionDecision ¶
type SuppressionDecision struct {
Allow bool
Summary *SuppressionSummary
}
type SuppressionKey ¶
type SuppressionSummary ¶
type SuppressionSummary struct {
Key SuppressionKey
Kind string
SuppressedCount uint64
}
type Suppressor ¶
type Suppressor struct {
// contains filtered or unexported fields
}
func NewSuppressor ¶
func NewSuppressor(opts SuppressorOptions) *Suppressor
func (*Suppressor) Contains ¶
func (s *Suppressor) Contains(key SuppressionKey) bool
func (*Suppressor) Len ¶
func (s *Suppressor) Len() int
func (*Suppressor) Observe ¶
func (s *Suppressor) Observe(key SuppressionKey, now time.Time) SuppressionDecision
func (*Suppressor) Recover ¶
func (s *Suppressor) Recover(key SuppressionKey, now time.Time) *SuppressionSummary
type SuppressorOptions ¶
Click to show internal directories.
Click to hide internal directories.