Merge pull request #15449 from hongmengning/main

discovery: fix some function names in comment
pull/15480/head
Björn Rabenstein 2024-11-27 19:42:22 +01:00 committed by GitHub
commit 1094200a6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -241,7 +241,7 @@ func (d *Discovery) shouldWatch(name string, tags []string) bool {
return d.shouldWatchFromName(name) && d.shouldWatchFromTags(tags)
}
// shouldWatch returns whether the service of the given name should be watched based on its name.
// shouldWatchFromName returns whether the service of the given name should be watched based on its name.
func (d *Discovery) shouldWatchFromName(name string) bool {
// If there's no fixed set of watched services, we watch everything.
if len(d.watchedServices) == 0 {
@ -256,7 +256,7 @@ func (d *Discovery) shouldWatchFromName(name string) bool {
return false
}
// shouldWatch returns whether the service of the given name should be watched based on its tags.
// shouldWatchFromTags returns whether the service of the given name should be watched based on its tags.
// This gets called when the user doesn't specify a list of services in order to avoid watching
// *all* services. Details in https://github.com/prometheus/prometheus/pull/3814
func (d *Discovery) shouldWatchFromTags(tags []string) bool {