Skip to content

Commit

Permalink
fix(collector): auth validator is nil (#6442)
Browse files Browse the repository at this point in the history
* fix(collector): auth validator is nil

Signed-off-by: Ash <root@viper.run>

* remove unuse skipValidator

Signed-off-by: Ash <root@viper.run>

* add DependenciesFunc to get service erda.oap.collector.authentication.Validator

Signed-off-by: Ash <root@viper.run>

* change service finder with .*

Signed-off-by: Ash <root@viper.run>

---------

Signed-off-by: Ash <root@viper.run>
  • Loading branch information
iutx authored Sep 23, 2024
1 parent 0a8558c commit cb68cd8
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package collector

import (
"strings"

"github.com/erda-project/erda-infra/base/logs"
"github.com/erda-project/erda-infra/base/servicehub"
"github.com/erda-project/erda-infra/providers/httpserver"
Expand Down Expand Up @@ -95,6 +97,15 @@ func init() {
servicehub.Register(providerName, &servicehub.Spec{
Services: []string{providerName},
Description: "here is description of erda.oap.collector.receiver.collector",
DependenciesFunc: func(hub *servicehub.Hub) (list []string) {
hub.ForeachServices(func(service string) bool {
if strings.HasPrefix(service, "erda.oap.collector.authentication.") {
list = append(list, service)
}
return true
})
return list
},
ConfigFunc: func() interface{} {
return &config{}
},
Expand Down

0 comments on commit cb68cd8

Please sign in to comment.