Skip to content

Commit

Permalink
Fix docstring
Browse files Browse the repository at this point in the history
Signed-off-by: chrismark <[email protected]>
  • Loading branch information
ChrsMark committed Nov 23, 2021
1 parent 1900ea1 commit b874f1f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions libbeat/common/kubernetes/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b874f1f

Please sign in to comment.