NewIndexerInformer returns a Indexer and a controller for populating the index while also providing event notifications. You should only used the returned Index for Get/List operations; Add/Modify/Deletes will cause the event notifications to be faulty. Parameters: * lw is list and watch functions
( lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration, h ResourceEventHandler, indexers Indexers, )
| 305 | // * indexers is the indexer for the received object type. |
| 306 | // |
| 307 | func NewIndexerInformer( |
| 308 | lw ListerWatcher, |
| 309 | objType runtime.Object, |
| 310 | resyncPeriod time.Duration, |
| 311 | h ResourceEventHandler, |
| 312 | indexers Indexers, |
| 313 | ) (Indexer, Controller) { |
| 314 | // This will hold the client state, as we know it. |
| 315 | clientState := NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers) |
| 316 | |
| 317 | return clientState, newInformer(lw, objType, resyncPeriod, h, clientState) |
| 318 | } |
| 319 | |
| 320 | // newInformer returns a controller for populating the store while also |
| 321 | // providing event notifications. |
no test coverage detected