Skip to content

Commit 4a4996f

Browse files
author
Shawn Hurley
committed
line lengths and comment fixes
1 parent 8a7544f commit 4a4996f

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

pkg/cache/internal/deleg_map.go

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

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

6970
return cache.WaitForCacheSync(stop, syncedFuncs...)
7071
}
7172

72-
// WaitForCacheSync waits until all the caches have been synced
7373
// Get will create a new Informer and add it to the map of InformersMap if none exists. Returns
7474
// the Informer from the map.
7575
func (m *InformersMap) Get(gvk schema.GroupVersionKind, obj runtime.Object) (*MapEntry, error) {

pkg/cache/internal/informers_map.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ import (
3636

3737
// clientCreatorFunc knows how to create a client and the corresponding list object that it should
3838
// deserialize into for any given group-version-kind.
39-
type clientCreatorFunc func(gvk schema.GroupVersionKind, codecs serializer.CodecFactory, scheme *runtime.Scheme, baseConfig *rest.Config) (client rest.Interface, listObj runtime.Object, err error)
39+
type clientCreatorFunc func(gvk schema.GroupVersionKind,
40+
codecs serializer.CodecFactory,
41+
scheme *runtime.Scheme,
42+
baseConfig *rest.Config) (client rest.Interface, listObj runtime.Object, err error)
4043

4144
// newSpecificInformersMap returns a new specificInformersMap (like
4245
// the generical InformersMap, except that it doesn't implement WaitForCacheSync).
@@ -237,7 +240,11 @@ func (ip *specificInformersMap) newListWatch(gvk schema.GroupVersionKind) (*cach
237240

238241
// createUnstructuredClient is a ClientCreatorFunc for use with structured
239242
// objects (i.e. not Unstructured/UnstructuredList).
240-
func createStructuredClient(gvk schema.GroupVersionKind, codecs serializer.CodecFactory, scheme *runtime.Scheme, baseConfig *rest.Config) (rest.Interface, runtime.Object, error) {
243+
func createStructuredClient(gvk schema.GroupVersionKind,
244+
codecs serializer.CodecFactory,
245+
scheme *runtime.Scheme,
246+
baseConfig *rest.Config) (rest.Interface, runtime.Object, error) {
247+
241248
client, err := apiutil.RESTClientForGVK(gvk, baseConfig, codecs)
242249
if err != nil {
243250
return nil, nil, err
@@ -252,7 +259,11 @@ func createStructuredClient(gvk schema.GroupVersionKind, codecs serializer.Codec
252259
}
253260

254261
// createUnstructuredClient is a ClientCreatorFunc for use with Unstructured and UnstructuredList.
255-
func createUnstructuredClient(gvk schema.GroupVersionKind, _ serializer.CodecFactory, _ *runtime.Scheme, baseConfig *rest.Config) (rest.Interface, runtime.Object, error) {
262+
func createUnstructuredClient(gvk schema.GroupVersionKind,
263+
_ serializer.CodecFactory,
264+
_ *runtime.Scheme,
265+
baseConfig *rest.Config) (rest.Interface, runtime.Object, error) {
266+
256267
listObj := &unstructured.UnstructuredList{}
257268
client, err := apiutil.RESTUnstructuredClientForGVK(gvk, baseConfig)
258269
if err != nil {

0 commit comments

Comments
 (0)