We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea5c56c commit 009c42fCopy full SHA for 009c42f
pkg/internal/listergen/lister.go
@@ -84,6 +84,13 @@ type {{.kind.String | lowerFirst }}ClusterLister struct {
84
}
85
86
// New{{.kind.String}}ClusterLister returns a new {{.kind.String}}ClusterLister.
87
+// We assume that the indexer:
88
+// - is fed by a cross-workspace LIST+WATCH
89
+// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function
90
+// - has the kcpcache.ClusterIndex as an index
91
+{{ if .kind.IsNamespaced -}}
92
+// - has the kcpcache.ClusterAndNamespaceIndex as an index
93
+{{end -}}
94
func New{{.kind.String}}ClusterLister(indexer cache.Indexer) *{{.kind.String | lowerFirst}}ClusterLister {
95
return &{{.kind.String | lowerFirst}}ClusterLister{indexer: indexer}
96
0 commit comments