Browse Source

code style

bergquist 8 năm trước cách đây
mục cha
commit
48e7f866f6

+ 0 - 2
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)
 }

+ 4 - 6
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
 }

+ 4 - 4
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<string, string> 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);
-}
+}