File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,18 @@ type Source interface {
55
55
Start (handler.EventHandler , workqueue.RateLimitingInterface , ... predicate.Predicate ) error
56
56
}
57
57
58
- // CreateSourceWithFixedCache creates a Source without InjectCache, so that it is assured that the given cache is used
59
- // and not overwritten
60
- func CreateSourceWithFixedCache (object runtime.Object , cache cache.Cache ) Source {
61
- return & sourceWithFixedCache {kind : Kind {Type : object , cache : cache }}
58
+ // NewKindWithFixedCache creates a Source without InjectCache, so that it is assured that the given cache is used
59
+ // and not overwritten. It can be used to watch objects in a different cluster by passing the cache
60
+ // from that other cluster
61
+ func NewKindWithFixedCache (object runtime.Object , cache cache.Cache ) Source {
62
+ return & kindWithFixedCache {kind : Kind {Type : object , cache : cache }}
62
63
}
63
64
64
- type sourceWithFixedCache struct {
65
+ type kindWithFixedCache struct {
65
66
kind Kind
66
67
}
67
68
68
- func (ks * sourceWithFixedCache ) Start (handler handler.EventHandler , queue workqueue.RateLimitingInterface ,
69
+ func (ks * kindWithFixedCache ) Start (handler handler.EventHandler , queue workqueue.RateLimitingInterface ,
69
70
prct ... predicate.Predicate ) error {
70
71
return ks .kind .Start (handler , queue , prct ... )
71
72
}
You can’t perform that action at this time.
0 commit comments