Initial boilerplate backend plugin

This commit is contained in:
Alexander Zobnin
2019-09-24 19:28:34 +03:00
parent f1de88d122
commit 3fccec1bb8
4 changed files with 58 additions and 3 deletions

17
pkg/datasource.go Normal file
View File

@@ -0,0 +1,17 @@
package main
import (
"github.com/grafana/grafana_plugin_model/go/datasource"
hclog "github.com/hashicorp/go-hclog"
plugin "github.com/hashicorp/go-plugin"
"golang.org/x/net/context"
)
type ZabbixDatasource struct {
plugin.NetRPCUnsupportedPlugin
logger hclog.Logger
}
func (ds *ZabbixDatasource) Query(ctx context.Context, tsdbReq *datasource.DatasourceRequest) (*datasource.DatasourceResponse, error) {
return nil, ctx.Err()
}