Informers knows how to create or fetch informers for different group-version-kinds, and add indices to those informers. It's safe to call GetInformer from multiple threads.
| 74 | // group-version-kinds, and add indices to those informers. It's safe to call |
| 75 | // GetInformer from multiple threads. |
| 76 | type Informers interface { |
| 77 | // GetInformer fetches or constructs an informer for the given object that corresponds to a single |
| 78 | // API kind and resource. |
| 79 | GetInformer(ctx context.Context, obj client.Object, opts ...InformerGetOption) (Informer, error) |
| 80 | |
| 81 | // GetInformerForKind is similar to GetInformer, except that it takes a group-version-kind, instead |
| 82 | // of the underlying object. |
| 83 | GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind, opts ...InformerGetOption) (Informer, error) |
| 84 | |
| 85 | // RemoveInformer removes an informer entry and stops it if it was running. |
| 86 | RemoveInformer(ctx context.Context, obj client.Object) error |
| 87 | |
| 88 | // Start runs all the informers known to this cache until the context is closed. |
| 89 | // It blocks. |
| 90 | Start(ctx context.Context) error |
| 91 | |
| 92 | // WaitForCacheSync waits for all the caches to sync. Returns false if it could not sync a cache. |
| 93 | WaitForCacheSync(ctx context.Context) bool |
| 94 | |
| 95 | // FieldIndexer adds indices to the managed informers. |
| 96 | client.FieldIndexer |
| 97 | } |
| 98 | |
| 99 | // Informer allows you to interact with the underlying informer. |
| 100 | type Informer interface { |
no outgoing calls
no test coverage detected
searching dependent graphs…