diff --git a/lib/srv/discovery/database_watcher.go b/lib/srv/discovery/database_watcher.go index 132a5f4fab5a0..4560e6e0ffe58 100644 --- a/lib/srv/discovery/database_watcher.go +++ b/lib/srv/discovery/database_watcher.go @@ -77,7 +77,7 @@ func (s *Server) startDatabaseWatchers() error { PreFetchHookFn: func() { discoveryConfigs := slices.FilterMapUnique( s.getAllDatabaseFetchers(), - func(f common.Fetcher) (s string, skip bool) { + func(f common.Fetcher) (s string, include bool) { return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != "" }, ) diff --git a/lib/srv/discovery/discovery.go b/lib/srv/discovery/discovery.go index 49bd7a7482745..a76778b3d1553 100644 --- a/lib/srv/discovery/discovery.go +++ b/lib/srv/discovery/discovery.go @@ -532,7 +532,7 @@ func (s *Server) initAWSWatchers(matchers []types.AWSMatcher) error { server.WithPreFetchHookFn(func() { discoveryConfigs := libslices.FilterMapUnique( s.getAllAWSServerFetchers(), - func(f server.Fetcher) (s string, skip bool) { + func(f server.Fetcher) (s string, include bool) { return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != "" }, ) @@ -727,7 +727,7 @@ func (s *Server) initAzureWatchers(ctx context.Context, matchers []types.AzureMa server.WithPreFetchHookFn(func() { discoveryConfigs := libslices.FilterMapUnique( s.getAllAzureServerFetchers(), - func(f server.Fetcher) (s string, skip bool) { + func(f server.Fetcher) (s string, include bool) { return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != "" }, ) @@ -794,7 +794,7 @@ func (s *Server) initGCPServerWatcher(ctx context.Context, vmMatchers []types.GC server.WithPreFetchHookFn(func() { discoveryConfigs := libslices.FilterMapUnique( s.getAllGCPServerFetchers(), - func(f server.Fetcher) (s string, skip bool) { + func(f server.Fetcher) (s string, include bool) { return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != "" }, ) diff --git a/lib/srv/discovery/kube_integration_watcher.go b/lib/srv/discovery/kube_integration_watcher.go index 179dbc3d98209..8178f14dda686 100644 --- a/lib/srv/discovery/kube_integration_watcher.go +++ b/lib/srv/discovery/kube_integration_watcher.go @@ -77,7 +77,7 @@ func (s *Server) startKubeIntegrationWatchers() error { PreFetchHookFn: func() { discoveryConfigs := libslices.FilterMapUnique( s.getKubeIntegrationFetchers(), - func(f common.Fetcher) (s string, skip bool) { + func(f common.Fetcher) (s string, include bool) { return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != "" }, ) diff --git a/lib/utils/slices/slices_test.go b/lib/utils/slices/slices_test.go index aa80fd00f99a9..6591880c0ff27 100644 --- a/lib/utils/slices/slices_test.go +++ b/lib/utils/slices/slices_test.go @@ -56,7 +56,7 @@ func TestFilterMapUnique(t *testing.T) { expected: []string{"x", "y", "z"}, }, { - name: "includeped values are not returned", + name: "not included values are not returned", input: []string{"x", "y", "z", ""}, collector: func(in string) (s string, include bool) { return in, in != ""