diff --git a/go.mod b/go.mod index 23fcc8c8..cf09b424 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( google.golang.org/protobuf v1.34.2 gopkg.in/evanphx/json-patch.v4 v4.12.0 k8s.io/api v0.0.0-20241007141734-f2b3dfac9f9a - k8s.io/apimachinery v0.0.0-20241004115029-c463db196543 + k8s.io/apimachinery v0.0.0-20241008174842-acfda137309f k8s.io/klog/v2 v2.130.1 k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 diff --git a/go.sum b/go.sum index 911b206e..cf6a354f 100644 --- a/go.sum +++ b/go.sum @@ -157,8 +157,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/api v0.0.0-20241007141734-f2b3dfac9f9a h1:8q3QPAbWPx++17jOoJM531vGG++BaX6gtqbDE0+Ris8= k8s.io/api v0.0.0-20241007141734-f2b3dfac9f9a/go.mod h1:4imq7dQloEla0ISqR4MeHpt7KNQ/IbLuRQM6skmjopE= -k8s.io/apimachinery v0.0.0-20241004115029-c463db196543 h1:CGv23f9CJ4us75c23ziAVpdkPgJj63aFkKlD0jTl/AI= -k8s.io/apimachinery v0.0.0-20241004115029-c463db196543/go.mod h1:5rKPDwwN9qm//xASFCZ83nyYEanHxxhc7pZ8AC4lukY= +k8s.io/apimachinery v0.0.0-20241008174842-acfda137309f h1:H2ZYi+KurPHzI6h2BZo8c/jMt9Qj450Hrhkxz4u24X4= +k8s.io/apimachinery v0.0.0-20241008174842-acfda137309f/go.mod h1:5rKPDwwN9qm//xASFCZ83nyYEanHxxhc7pZ8AC4lukY= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 h1:GKE9U8BH16uynoxQii0auTjmmmuZ3O0LFMN6S0lPPhI= 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.