mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 13:52:12 +08:00
Plugins: Remove old code related to Core plugin installs (#44311)
* remove old code * remove even more * skip flaky test
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user