Plugins: Refactor loader + finder to support multiple sourcing methods (#64735)

* it's cdn time

* tidy body closing

* auto signed

* fix close

* update log name

* remove comments
This commit is contained in:
Will Browne
2023-03-20 13:35:49 +00:00
committed by GitHub
parent eba2c7b522
commit ee2dd62a1f
25 changed files with 389 additions and 223 deletions

View File

@ -26,9 +26,9 @@ func ProvideService(gCfg *setting.Cfg, cfg *config.Cfg) *Service {
func (s *Service) List(_ context.Context) []plugins.PluginSource {
return []plugins.PluginSource{
{Class: plugins.Core, Paths: corePluginPaths(s.gCfg.StaticRootPath)},
{Class: plugins.Bundled, Paths: []string{s.gCfg.BundledPluginsPath}},
{Class: plugins.External, Paths: append([]string{s.cfg.PluginsPath}, pluginFSPaths(s.cfg.PluginSettings)...)},
NewLocalSource(plugins.Core, corePluginPaths(s.gCfg.StaticRootPath)),
NewLocalSource(plugins.Bundled, []string{s.gCfg.BundledPluginsPath}),
NewLocalSource(plugins.External, append([]string{s.cfg.PluginsPath}, pluginFSPaths(s.cfg.PluginSettings)...)),
}
}