MCPcopy
hub / github.com/kubernetes/client-go / NewNamespaceKeyedIndexerAndReflector

Function NewNamespaceKeyedIndexerAndReflector

tools/cache/reflector.go:85–89  ·  view source on GitHub ↗

NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector The indexer is configured to key on namespace

(lw ListerWatcher, expectedType interface{}, resyncPeriod time.Duration)

Source from the content-addressed store, hash-verified

83// NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector
84// The indexer is configured to key on namespace
85func NewNamespaceKeyedIndexerAndReflector(lw ListerWatcher, expectedType interface{}, resyncPeriod time.Duration) (indexer Indexer, reflector *Reflector) {
86 indexer = NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc})
87 reflector = NewReflector(lw, expectedType, indexer, resyncPeriod)
88 return indexer, reflector
89}
90
91// NewReflector creates a new Reflector object which will keep the given store up to
92// date with the server's contents for the given resource. Reflector promises to

Callers

nothing calls this directly

Calls 2

NewIndexerFunction · 0.85
NewReflectorFunction · 0.85

Tested by

no test coverage detected