From 146d03f559c3be38f50ce66c4ef24e525e6c2f19 Mon Sep 17 00:00:00 2001 From: Alexander Stephan Date: Thu, 26 Sep 2024 15:09:59 +0000 Subject: [PATCH] Export name and typeDescription members of reflector struct Kubernetes-commit: 154b8aa8806d743c41d1acf0b498bdecf1767872 --- tools/cache/reflector.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/cache/reflector.go b/tools/cache/reflector.go index 5e7dd574..a3363f0f 100644 --- a/tools/cache/reflector.go +++ b/tools/cache/reflector.go @@ -57,7 +57,7 @@ var ( // Reflector watches a specified resource and causes all changes to be reflected in the given store. type Reflector struct { - // name identifies this reflector. By default it will be a file:line if possible. + // name identifies this reflector. By default, it will be a file:line if possible. name string // The name of the type we expect to place in the store. The name // will be the stringification of expectedGVK if provided, and the @@ -121,6 +121,14 @@ type Reflector struct { UseWatchList *bool } +func (r *Reflector) GetName() string { + return r.name +} + +func (r *Reflector) GetTypeDescription() string { + return r.typeDescription +} + // ResourceVersionUpdater is an interface that allows store implementation to // track the current resource version of the reflector. This is especially // important if storage bookmarks are enabled.