mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
ec82719372
* refactor * implement with infra log for now * undo moving * update package name * update name * fix tests * update pretty signature * update naming * simplify * fix typo * delete comment * fix import * retrigger
37 lines
724 B
Go
37 lines
724 B
Go
package backendplugin
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
|
|
|
"github.com/grafana/grafana/pkg/plugins/log"
|
|
)
|
|
|
|
// Plugin is the backend plugin interface.
|
|
type Plugin interface {
|
|
PluginID() string
|
|
Logger() log.Logger
|
|
Start(ctx context.Context) error
|
|
Stop(ctx context.Context) error
|
|
IsManaged() bool
|
|
Exited() bool
|
|
Decommission() error
|
|
IsDecommissioned() bool
|
|
Target() Target
|
|
backend.CollectMetricsHandler
|
|
backend.CheckHealthHandler
|
|
backend.QueryDataHandler
|
|
backend.CallResourceHandler
|
|
backend.StreamHandler
|
|
}
|
|
|
|
type Target string
|
|
|
|
const (
|
|
TargetNone Target = "none"
|
|
TargetUnknown Target = "unknown"
|
|
TargetInMemory Target = "in_memory"
|
|
TargetLocal Target = "local"
|
|
)
|