Plugins: Update renderer plugin source (#80643)

* rework renderer plugin source

* add tests
This commit is contained in:
Will Browne
2024-01-18 11:06:33 +01:00
committed by GitHub
parent 4b113f87f9
commit 3885497553
10 changed files with 233 additions and 41 deletions

View File

@@ -75,6 +75,10 @@ func (l *Loader) instrumentLoad(ctx context.Context, src plugins.PluginSource) f
return func(logger log.Logger, start time.Time) func([]*plugins.Plugin) {
return func(plugins []*plugins.Plugin) {
if len(plugins) == 0 {
logger.Debug("Plugin source loaded, though no plugins were found")
return
}
names := make([]string, len(plugins))
for i, p := range plugins {
names[i] = p.ID