From 48e7f866f62990b4cc90da23ef1efbacacc6d985 Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 11 Dec 2017 11:26:36 +0100 Subject: [PATCH] code style --- pkg/tsdb/models/proxy/grpc.go | 2 -- pkg/tsdb/models/proxy/interface.go | 10 ++++------ pkg/tsdb/models/tsdb_plugin.proto | 8 ++++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/pkg/tsdb/models/proxy/grpc.go b/pkg/tsdb/models/proxy/grpc.go index 76a110385fe..b5871fcc053 100644 --- a/pkg/tsdb/models/proxy/grpc.go +++ b/pkg/tsdb/models/proxy/grpc.go @@ -9,8 +9,6 @@ type GRPCClient struct { proto.TsdbPluginClient } -//Query(ctx context.Context, ds *models.DataSource, query *TsdbQuery) (*Response, error) - func (m *GRPCClient) Query(ctx context.Context, req *proto.TsdbQuery) (*proto.Response, error) { return m.TsdbPluginClient.Query(ctx, req) } diff --git a/pkg/tsdb/models/proxy/interface.go b/pkg/tsdb/models/proxy/interface.go index 313eac613e5..e8d89b5c38f 100644 --- a/pkg/tsdb/models/proxy/interface.go +++ b/pkg/tsdb/models/proxy/interface.go @@ -3,22 +3,20 @@ package proxy import ( "golang.org/x/net/context" - //tsdb "github.com/grafana/grafana/pkg/tsdb" - proto "github.com/grafana/grafana/pkg/tsdb/models" plugin "github.com/hashicorp/go-plugin" "google.golang.org/grpc" ) -var PluginMap = map[string]plugin.Plugin{ - "tsdb_mock": &TsdbPluginImpl{}, -} +// var PluginMap = map[string]plugin.Plugin{ +// "tsdb_mock": &TsdbPluginImpl{}, +// } type TsdbPlugin interface { Query(ctx context.Context, req *proto.TsdbQuery) (*proto.Response, error) } -type TsdbPluginImpl struct { //LOL IMPL LOL +type TsdbPluginImpl struct { plugin.NetRPCUnsupportedPlugin Plugin TsdbPlugin } diff --git a/pkg/tsdb/models/tsdb_plugin.proto b/pkg/tsdb/models/tsdb_plugin.proto index 2625e4c891c..94f3045dc9d 100644 --- a/pkg/tsdb/models/tsdb_plugin.proto +++ b/pkg/tsdb/models/tsdb_plugin.proto @@ -5,7 +5,6 @@ package plugins; import "google/protobuf/timestamp.proto"; -// Message represents a simple message sent to the Echo service. message TsdbQuery { Timerange timerange = 1; DatasourceInfo datasource = 2; @@ -37,7 +36,8 @@ message QueryResult { string refId = 3; string metaJson = 4; repeated TsdbSeries series = 5; - //repeat TsdbTables tables = x; + + //repeat TsdbTables tables = x; } message DatasourceInfo { @@ -55,7 +55,7 @@ message DatasourceInfo { message TsdbSeries { string name = 1; map tags = 2; - repeated Point points = 3; + repeated Point points = 3; } message Point { @@ -65,4 +65,4 @@ message Point { service TsdbPlugin { rpc Query(TsdbQuery) returns (Response); -} \ No newline at end of file +}