mirror of
https://github.com/rancher/steve.git
synced 2025-09-19 10:26:25 +00:00
Add comments to clarify where non-test-mode methods are defined. (#809)
This commit is contained in:
@@ -153,6 +153,8 @@ func (f *CacheFactory) cacheForLocked(ctx context.Context, fields [][]string, ex
|
||||
|
||||
_, encryptResourceAlways := defaultEncryptedResourceTypes[gvk]
|
||||
shouldEncrypt := f.encryptAll || encryptResourceAlways
|
||||
// In non-test code this invokes pkg/sqlcache/informer/informer.go: NewInformer()
|
||||
// search for "func NewInformer(ctx"
|
||||
i, err := f.newInformer(f.ctx, client, fields, externalUpdateInfo, selfUpdateInfo, transform, gvk, f.dbClient, shouldEncrypt, namespaced, watchable, f.gcInterval, f.gcKeepCount)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@@ -106,6 +106,8 @@ func NewInformer(ctx context.Context, client dynamic.ResourceInterface, fields [
|
||||
// We therefore just disable it right away.
|
||||
resyncPeriod := time.Duration(0)
|
||||
|
||||
// In non-test mode `newInformer` is cache.NewSharedIndexInformer
|
||||
// defined in k8s.io/client-go/tools/cache/shared_informer.go : func NewSharedIndexInformer(lw ...
|
||||
sii := newInformer(listWatcher, example, resyncPeriod, cache.Indexers{})
|
||||
if transform != nil {
|
||||
if err := sii.SetTransform(transform); err != nil {
|
||||
|
Reference in New Issue
Block a user