grafana/pkg/plugins/backendplugin/ifaces.go
Will Browne ec82719372
Plugins: Introduce plugin package specific logger (#62204)
* 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
2023-02-28 16:10:27 +01:00

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"
)