2022-06-03 13:06:27 +02:00
|
|
|
package loader
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/plugins"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Service is responsible for loading plugins from the file system.
|
|
|
|
type Service interface {
|
|
|
|
// Load will return a list of plugins found in the provided file system paths.
|
2023-03-20 13:35:49 +00:00
|
|
|
Load(ctx context.Context, src plugins.PluginSource) ([]*plugins.Plugin, error)
|
2022-09-23 14:27:01 +02:00
|
|
|
// Unload will unload a specified plugin from the file system.
|
|
|
|
Unload(ctx context.Context, pluginID string) error
|
2022-06-03 13:06:27 +02:00
|
|
|
}
|