@@ -239,8 +239,9 @@ type Options struct {
239
239
// If unset, this will fall through to the Default* settings.
240
240
ByObject map [client.Object ]ByObject
241
241
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
244
245
}
245
246
246
247
// 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 {
432
433
WatchErrorHandler : opts .DefaultWatchErrorHandler ,
433
434
UnsafeDisableDeepCopy : ptr .Deref (config .UnsafeDisableDeepCopy , false ),
434
435
EnableWatchBookmarks : ptr .Deref (config .EnableWatchBookmarks , true ),
435
- NewInformer : opts .newInformer ,
436
+ NewInformer : opts .NewInformer ,
436
437
}),
437
438
readerFailOnMissingInformer : opts .ReaderFailOnMissingInformer ,
438
439
}
0 commit comments