Skip to content

Commit

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

Signed-off-by: Ash <[email protected]>

* remove unuse skipValidator

Signed-off-by: Ash <[email protected]>

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

Signed-off-by: Ash <[email protected]>

* change service finder with .*

Signed-off-by: Ash <[email protected]>

---------

Signed-off-by: Ash <[email protected]>
  • 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.