Skip to content

Commit 3ce1536

Browse files
author
Shawn Hurley
committed
Addressing pr comments
1 parent f4fabe9 commit 3ce1536

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pkg/cache/internal/deleg_map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (m *InformersMap) Start(stop <-chan struct{}) error {
6262
return nil
6363
}
6464

65-
// WaitForCacheSync waits until all the caches have been synced
65+
// WaitForCacheSync waits until all the caches have been synced.
6666
func (m *InformersMap) WaitForCacheSync(stop <-chan struct{}) bool {
6767
syncedFuncs := append([]cache.InformerSynced(nil), m.structured.HasSyncedFuncs()...)
6868
syncedFuncs = append(syncedFuncs, m.unstructured.HasSyncedFuncs()...)

pkg/cache/internal/informers_map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (ip *specificInformersMap) newListWatch(gvk schema.GroupVersionKind) (*cach
238238
}, nil
239239
}
240240

241-
// createUnstructuredClient is a ClientCreatorFunc for use with structured
241+
// createStructuredClient is a ClientCreatorFunc for use with structured
242242
// objects (i.e. not Unstructured/UnstructuredList).
243243
func createStructuredClient(gvk schema.GroupVersionKind,
244244
codecs serializer.CodecFactory,

pkg/client/client_cache.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ type clientCache struct {
4545
// codecs are used to create a REST client for a gvk
4646
codecs serializer.CodecFactory
4747

48+
muByType sync.RWMutex
4849
// resourceByType caches type metadata
4950
resourceByType map[reflect.Type]*resourceMeta
51+
52+
muByGVK sync.RWMutex
5053
// resourceByGVK caches type metadata for unstructured
5154
unstructuredResourceByGVK map[schema.GroupVersionKind]*resourceMeta
52-
muByType sync.RWMutex
53-
muByGVK sync.RWMutex
5455
}
5556

5657
// newResource maps obj to a Kubernetes Resource and constructs a client for that Resource.

0 commit comments

Comments
 (0)