Merge pull request #127663 from alexanderstephan/export-reflector

Export name and typeDescription members of reflector struct
This commit is contained in:
Kubernetes Prow Robot
2024-10-09 00:16:22 +01:00
committed by GitHub

View File

@@ -57,7 +57,7 @@ var (
// Reflector watches a specified resource and causes all changes to be reflected in the given store. // Reflector watches a specified resource and causes all changes to be reflected in the given store.
type Reflector struct { 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 name string
// The name of the type we expect to place in the store. The name // The name of the type we expect to place in the store. The name
// will be the stringification of expectedGVK if provided, and the // will be the stringification of expectedGVK if provided, and the
@@ -121,6 +121,14 @@ type Reflector struct {
UseWatchList *bool 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 // ResourceVersionUpdater is an interface that allows store implementation to
// track the current resource version of the reflector. This is especially // track the current resource version of the reflector. This is especially
// important if storage bookmarks are enabled. // important if storage bookmarks are enabled.