From b874f1f7335cb46234d4102a47f71bf29b18338a Mon Sep 17 00:00:00 2001 From: chrismark Date: Tue, 23 Nov 2021 11:44:27 +0000 Subject: [PATCH] Fix docstring Signed-off-by: chrismark --- libbeat/common/kubernetes/watcher.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libbeat/common/kubernetes/watcher.go b/libbeat/common/kubernetes/watcher.go index 621978090a4..75f32f66d66 100644 --- a/libbeat/common/kubernetes/watcher.go +++ b/libbeat/common/kubernetes/watcher.go @@ -93,9 +93,15 @@ type watcher struct { logger *logp.Logger } -// NewNamedWatcher does the same as NewWatcher, but also allows to name the k8s -// client's workqueue that is used by the watcher, unlike NewWatcher which sets -// the workqueue name to "". Workqueue name is important for exposing workqueue +// NewWatcher initializes the watcher client to provide a events handler for +// resource from the cluster (filtered to the given node) +func NewWatcher(client kubernetes.Interface, resource Resource, opts WatchOptions, indexers cache.Indexers) (Watcher, error) { + return NewNamedWatcher("", client, resource, opts, indexers) +} + +// NewNamedWatcher initializes the watcher client to provide an events handler for +// resource from the cluster (filtered to the given node) and also allows to name the k8s +// client's workqueue that is used by the watcher. Workqueue name is important for exposing workqueue // metrics, if it is empty, its metrics will not be logged by the k8s client. func NewNamedWatcher(name string, client kubernetes.Interface, resource Resource, opts WatchOptions, indexers cache.Indexers) (Watcher, error) { var store cache.Store