File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,9 @@ type ByObject struct {
191191 UnsafeDisableDeepCopy * bool
192192}
193193
194+ // NewCacheFunc - Function for creating a new cache from the options and a rest config.
195+ type NewCacheFunc func (config * rest.Config , opts Options ) (Cache , error )
196+
194197// New initializes and returns a new Cache.
195198func New (config * rest.Config , opts Options ) (Cache , error ) {
196199 if len (opts .Namespaces ) == 0 {
Original file line number Diff line number Diff line change @@ -31,9 +31,6 @@ import (
3131 "sigs.k8s.io/controller-runtime/pkg/client/apiutil"
3232)
3333
34- // NewCacheFunc - Function for creating a new cache from the options and a rest config.
35- type NewCacheFunc func (config * rest.Config , opts Options ) (Cache , error )
36-
3734// a new global namespaced cache to handle cluster scoped resources.
3835const globalCache = "_cluster-scope"
3936
@@ -44,7 +41,7 @@ const globalCache = "_cluster-scope"
4441// to be used for excluding namespaces, this is better done via a Predicate. Also note that
4542// you may face performance issues when using this with a high number of namespaces.
4643//
47- // Deprecated: Use cache.Options.View. Namespaces instead.
44+ // Deprecated: Use cache.Options.Namespaces instead.
4845func MultiNamespacedCacheBuilder (namespaces []string ) NewCacheFunc {
4946 return func (config * rest.Config , opts Options ) (Cache , error ) {
5047 opts .Namespaces = namespaces
You can’t perform that action at this time.
0 commit comments