Plugins: Move discovery logic to plugin sources (#106911)

* move finder behaviour to source

* tidy

* undo go.mod changes

* fix comment

* tidy unsafe local source
This commit is contained in:
Will Browne
2025-06-19 10:28:23 +01:00
committed by GitHub
parent 2b21bdf4e1
commit 3d37f969e7
23 changed files with 475 additions and 917 deletions
+4 -1
View File
@@ -18,9 +18,12 @@ type Installer interface {
}
type PluginSource interface {
// PluginClass is the associated Class of plugin for this source
PluginClass(ctx context.Context) Class
PluginURIs(ctx context.Context) []string
// DefaultSignature is the (optional) default signature information for this source
DefaultSignature(ctx context.Context, pluginID string) (Signature, bool)
// Discover finds and returns plugin bundles from this source
Discover(ctx context.Context) ([]*FoundBundle, error)
}
type FileStore interface {