@@ -239,8 +239,9 @@ type Options struct {
239239 // If unset, this will fall through to the Default* settings.
240240 ByObject map [client.Object ]ByObject
241241
242- // newInformer allows overriding of NewSharedIndexInformer for testing.
243- newInformer * func (toolscache.ListerWatcher , runtime.Object , time.Duration , toolscache.Indexers ) toolscache.SharedIndexInformer
242+ // NewInformer allows overriding of NewSharedIndexInformer, for example for testing
243+ // or if someone wants to write their own Informer.
244+ NewInformer func (toolscache.ListerWatcher , runtime.Object , time.Duration , toolscache.Indexers ) toolscache.SharedIndexInformer
244245}
245246
246247// ByObject offers more fine-grained control over the cache's ListWatch by object.
@@ -432,7 +433,7 @@ func newCache(restConfig *rest.Config, opts Options) newCacheFunc {
432433 WatchErrorHandler : opts .DefaultWatchErrorHandler ,
433434 UnsafeDisableDeepCopy : ptr .Deref (config .UnsafeDisableDeepCopy , false ),
434435 EnableWatchBookmarks : ptr .Deref (config .EnableWatchBookmarks , true ),
435- NewInformer : opts .newInformer ,
436+ NewInformer : opts .NewInformer ,
436437 }),
437438 readerFailOnMissingInformer : opts .ReaderFailOnMissingInformer ,
438439 }
0 commit comments