@@ -385,6 +385,27 @@ func NewTransformingInformer(
385
385
return clientState , newInformer (lw , objType , resyncPeriod , h , clientState , transformer )
386
386
}
387
387
388
+ // NewTransformingIndexerInformer returns an Indexer and a controller for
389
+ // populating the index while also providing event notifications. You should
390
+ // only used the returned Index for Get/List operations; Add/Modify/Deletes
391
+ // will cause the event notifications to be faulty.
392
+ // The given transform function will be called on all objects before they will
393
+ // be put into the Index and corresponding Add/Modify/Delete handlers will
394
+ // be invoked for them.
395
+ func NewTransformingIndexerInformer (
396
+ lw ListerWatcher ,
397
+ objType runtime.Object ,
398
+ resyncPeriod time.Duration ,
399
+ h ResourceEventHandler ,
400
+ indexers Indexers ,
401
+ transformer TransformFunc ,
402
+ ) (Indexer , Controller ) {
403
+ // This will hold the client state, as we know it.
404
+ clientState := NewIndexer (DeletionHandlingMetaNamespaceKeyFunc , indexers )
405
+
406
+ return clientState , newInformer (lw , objType , resyncPeriod , h , clientState , transformer )
407
+ }
408
+
388
409
// newInformer returns a controller for populating the store while also
389
410
// providing event notifications.
390
411
//
0 commit comments