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