Allow customizing spam filtering in event client library

Kubernetes-commit: 00080d400fe27f11795b654ad1e124311831a0fc
This commit is contained in:
Aleksandra Gacek
2021-07-26 16:05:18 +02:00
committed by Kubernetes Publisher
parent 044192f4ee
commit 23071d64f0
3 changed files with 110 additions and 10 deletions

View File

@@ -82,6 +82,9 @@ type CorrelatorOptions struct {
// The clock used by the EventAggregator to allow for testing
// If not specified (zero value), clock.RealClock{} will be used
Clock clock.Clock
// The func used by EventFilterFunc, which returns a key for given event, based on which filtering will take place
// If not specified (zero value), getSpamKey will be used
SpamKeyFunc EventSpamKeyFunc
}
// EventRecorder knows how to record events on behalf of an EventSource.