Plugins: Make it possible to support multiple plugin versions (#82116)
* first pass * use version in more places * add comment * update installer * fix wire * fix tests * tidy * simplify changes * fix in mem * remove unused step * fix step dupe logic for child plugins + add tests
This commit is contained in:
@@ -8,12 +8,12 @@ import (
|
||||
|
||||
// Service is responsible for the internal storing and retrieval of plugins.
|
||||
type Service interface {
|
||||
// Plugin finds a plugin by its ID.
|
||||
Plugin(ctx context.Context, id string) (*plugins.Plugin, bool)
|
||||
// Plugin finds a plugin by its ID and version.
|
||||
Plugin(ctx context.Context, id, version string) (*plugins.Plugin, bool)
|
||||
// Plugins returns all plugins.
|
||||
Plugins(ctx context.Context) []*plugins.Plugin
|
||||
// Add adds the provided plugin to the registry.
|
||||
Add(ctx context.Context, plugin *plugins.Plugin) error
|
||||
// Remove deletes the requested plugin from the registry.
|
||||
Remove(ctx context.Context, id string) error
|
||||
Remove(ctx context.Context, id, version string) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user