mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 05:46:28 +08:00
Plugins: Refactor plugin config into separate env var and request scoped services (#83261)
* seperate services for env + req * merge with main * fix tests * undo changes to golden file * fix linter * remove unused fields * split out new config struct * provide config * undo go mod changes * more renaming * fix tests * undo bra.toml changes * update go.work.sum * undo changes * trigger * apply PR feedback
This commit is contained in:
@ -17,7 +17,7 @@ type Initializer interface {
|
||||
type InitializeFunc func(ctx context.Context, p *plugins.Plugin) (*plugins.Plugin, error)
|
||||
|
||||
type Initialize struct {
|
||||
cfg *config.Cfg
|
||||
cfg *config.PluginManagementCfg
|
||||
initializeSteps []InitializeFunc
|
||||
log log.Logger
|
||||
}
|
||||
@ -27,7 +27,7 @@ type Opts struct {
|
||||
}
|
||||
|
||||
// New returns a new Initialization stage.
|
||||
func New(cfg *config.Cfg, opts Opts) *Initialize {
|
||||
func New(cfg *config.PluginManagementCfg, opts Opts) *Initialize {
|
||||
if opts.InitializeFuncs == nil {
|
||||
opts.InitializeFuncs = []InitializeFunc{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user