Plugins: Remove old code related to Core plugin installs (#44311)

* remove old code

* remove even more

* skip flaky test
This commit is contained in:
Will Browne
2022-01-21 13:38:04 +01:00
committed by GitHub
parent 164ce63e28
commit da98ebdcdf
7 changed files with 1 additions and 146 deletions

View File

@ -16,28 +16,16 @@ type Store interface {
Plugin(ctx context.Context, pluginID string) (PluginDTO, bool)
// Plugins returns plugins by their requested type.
Plugins(ctx context.Context, pluginTypes ...Type) []PluginDTO
// Add adds a plugin to the store.
Add(ctx context.Context, pluginID, version string) error
// AddWithFactory adds a plugin to the store.
AddWithFactory(ctx context.Context, pluginID string, factory backendplugin.PluginFactoryFunc, resolver PluginPathResolver) error
// Remove removes a plugin from the store.
Remove(ctx context.Context, pluginID string) error
}
type PluginPathResolver func() (string, error)
type AddOpts struct {
PluginInstallDir, PluginZipURL, PluginRepoURL string
}
// Loader is responsible for loading plugins from the file system.
type Loader interface {
// Load will return a list of plugins found in the provided file system paths.
Load(ctx context.Context, class Class, paths []string, ignore map[string]struct{}) ([]*Plugin, error)
// LoadWithFactory will return a plugin found in the provided file system path and use the provided factory to
// construct the plugin backend client.
LoadWithFactory(ctx context.Context, class Class, path string, factory backendplugin.PluginFactoryFunc) (*Plugin, error)
}
// Installer is responsible for managing plugins (add / remove) on the file system.