@@ -48,11 +48,11 @@ type Cache interface {
48
48
type Informers interface {
49
49
// GetInformer fetches or constructs an informer for the given object that corresponds to a single
50
50
// API kind and resource.
51
- GetInformer (obj runtime.Object ) (toolscache. SharedIndexInformer , error )
51
+ GetInformer (obj runtime.Object ) (Informer , error )
52
52
53
53
// GetInformerForKind is similar to GetInformer, except that it takes a group-version-kind, instead
54
54
// of the underlying object.
55
- GetInformerForKind (gvk schema.GroupVersionKind ) (toolscache. SharedIndexInformer , error )
55
+ GetInformerForKind (gvk schema.GroupVersionKind ) (Informer , error )
56
56
57
57
// Start runs all the informers known to this cache until the given channel is closed.
58
58
// It blocks.
@@ -69,6 +69,23 @@ type Informers interface {
69
69
IndexField (obj runtime.Object , field string , extractValue client.IndexerFunc ) error
70
70
}
71
71
72
+ // Informer - informer allows you interact with the underlying informer
73
+ type Informer interface {
74
+ // AddEventHandler adds an event handler to the shared informer using the shared informer's resync
75
+ // period. Events to a single handler are delivered sequentially, but there is no coordination
76
+ // between different handlers.
77
+ AddEventHandler (handler toolscache.ResourceEventHandler )
78
+ // AddEventHandlerWithResyncPeriod adds an event handler to the shared informer using the
79
+ // specified resync period. Events to a single handler are delivered sequentially, but there is
80
+ // no coordination between different handlers.
81
+ AddEventHandlerWithResyncPeriod (handler toolscache.ResourceEventHandler , resyncPeriod time.Duration )
82
+ // AddIndexers adds more indexers to this store. If you call this after you already have data
83
+ // in the store, the results are undefined.
84
+ AddIndexers (indexers toolscache.Indexers ) error
85
+ //HasSynced return true if the informers underlying store has synced
86
+ HasSynced () bool
87
+ }
88
+
72
89
// Options are the optional arguments for creating a new InformersMap object
73
90
type Options struct {
74
91
// Scheme is the scheme to use for mapping objects to GroupVersionKinds
0 commit comments