Plugins: Remove old code related to Core plugin installs (#44311)
* remove old code * remove even more * skip flaky test
This commit is contained in:
@@ -2,12 +2,10 @@ package manager
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin"
|
||||
)
|
||||
|
||||
func (m *PluginManager) Plugin(_ context.Context, pluginID string) (plugins.PluginDTO, bool) {
|
||||
@@ -83,28 +81,6 @@ func (m *PluginManager) Add(ctx context.Context, pluginID, version string) error
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PluginManager) AddWithFactory(ctx context.Context, pluginID string, factory backendplugin.PluginFactoryFunc,
|
||||
pathResolver plugins.PluginPathResolver) error {
|
||||
if m.isRegistered(pluginID) {
|
||||
return fmt.Errorf("plugin %s is already registered", pluginID)
|
||||
}
|
||||
|
||||
path, err := pathResolver()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
p, err := m.pluginLoader.LoadWithFactory(ctx, plugins.Core, path, factory)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = m.register(p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PluginManager) Remove(ctx context.Context, pluginID string) error {
|
||||
plugin, exists := m.plugin(pluginID)
|
||||
if !exists {
|
||||
|
||||
Reference in New Issue
Block a user