mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 16:43:08 +08:00
Plugins: Tidy config struct (#84168)
* tidy plugins config usage * fix tests
This commit is contained in:
@ -9,7 +9,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/plugins/auth"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin/coreplugin"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin/provider"
|
||||
pCfg "github.com/grafana/grafana/pkg/plugins/config"
|
||||
"github.com/grafana/grafana/pkg/plugins/envvars"
|
||||
"github.com/grafana/grafana/pkg/plugins/log"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/client"
|
||||
@ -136,7 +135,7 @@ var WireExtensionSet = wire.NewSet(
|
||||
)
|
||||
|
||||
func ProvideClientDecorator(
|
||||
cfg *setting.Cfg, pCfg *pCfg.PluginManagementCfg,
|
||||
cfg *setting.Cfg,
|
||||
pluginRegistry registry.Service,
|
||||
oAuthTokenService oauthtoken.OAuthTokenService,
|
||||
tracer tracing.Tracer,
|
||||
@ -144,16 +143,16 @@ func ProvideClientDecorator(
|
||||
features *featuremgmt.FeatureManager,
|
||||
promRegisterer prometheus.Registerer,
|
||||
) (*client.Decorator, error) {
|
||||
return NewClientDecorator(cfg, pCfg, pluginRegistry, oAuthTokenService, tracer, cachingService, features, promRegisterer, pluginRegistry)
|
||||
return NewClientDecorator(cfg, pluginRegistry, oAuthTokenService, tracer, cachingService, features, promRegisterer, pluginRegistry)
|
||||
}
|
||||
|
||||
func NewClientDecorator(
|
||||
cfg *setting.Cfg, pCfg *pCfg.PluginManagementCfg,
|
||||
cfg *setting.Cfg,
|
||||
pluginRegistry registry.Service, oAuthTokenService oauthtoken.OAuthTokenService,
|
||||
tracer tracing.Tracer, cachingService caching.CachingService, features *featuremgmt.FeatureManager,
|
||||
promRegisterer prometheus.Registerer, registry registry.Service,
|
||||
) (*client.Decorator, error) {
|
||||
c := client.ProvideService(pluginRegistry, pCfg)
|
||||
c := client.ProvideService(pluginRegistry)
|
||||
middlewares := CreateMiddlewares(cfg, oAuthTokenService, tracer, cachingService, features, promRegisterer, registry)
|
||||
return client.NewDecorator(c, middlewares...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user