From f515d1e05bc071898beba7fd5da7a9ea10cf6263 Mon Sep 17 00:00:00 2001 From: Ulrich Kramer Date: Tue, 11 Feb 2020 17:15:36 +0100 Subject: [PATCH] Change NewKindWithFixedCache to NewKindWithCache --- pkg/source/source.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/source/source.go b/pkg/source/source.go index b84b425cf9..7251cea770 100644 --- a/pkg/source/source.go +++ b/pkg/source/source.go @@ -55,18 +55,18 @@ type Source interface { Start(handler.EventHandler, workqueue.RateLimitingInterface, ...predicate.Predicate) error } -// NewKindWithFixedCache creates a Source without InjectCache, so that it is assured that the given cache is used +// NewKindWithCache creates a Source without InjectCache, so that it is assured that the given cache is used // and not overwritten. It can be used to watch objects in a different cluster by passing the cache // from that other cluster -func NewKindWithFixedCache(object runtime.Object, cache cache.Cache) Source { - return &kindWithFixedCache{kind: Kind{Type: object, cache: cache}} +func NewKindWithCache(object runtime.Object, cache cache.Cache) Source { + return &kindWithCache{kind: Kind{Type: object, cache: cache}} } -type kindWithFixedCache struct { +type kindWithCache struct { kind Kind } -func (ks *kindWithFixedCache) Start(handler handler.EventHandler, queue workqueue.RateLimitingInterface, +func (ks *kindWithCache) Start(handler handler.EventHandler, queue workqueue.RateLimitingInterface, prct ...predicate.Predicate) error { return ks.kind.Start(handler, queue, prct...) }