Commit a2d47427 by bergquist

separate plugin impl and proto files

parent 0bc5bf53
......@@ -26,3 +26,6 @@ test: test-go test-js
run:
./bin/grafana-server
pbuf:
protoc -I pkg/tsdb/models pkg/tsdb/models/*.proto --go_out=plugins=grpc:pkg/tsdb/models/.
\ No newline at end of file
......@@ -22,6 +22,7 @@ import (
"github.com/grafana/grafana/pkg/metrics"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/plugins"
tsdbplugins "github.com/grafana/grafana/pkg/plugins/backend"
"github.com/grafana/grafana/pkg/services/alerting"
"github.com/grafana/grafana/pkg/services/cleanup"
"github.com/grafana/grafana/pkg/services/notifications"
......@@ -31,7 +32,6 @@ import (
"github.com/grafana/grafana/pkg/social"
"github.com/grafana/grafana/pkg/tracing"
tsdbplugins "github.com/grafana/grafana/pkg/tsdb/plugins"
)
func NewGrafanaServer() models.GrafanaServer {
......
......@@ -5,8 +5,8 @@ import (
"log"
"github.com/grafana/grafana/pkg/tsdb/plugins/proto"
shared "github.com/grafana/grafana/pkg/tsdb/plugins/shared"
shared "github.com/grafana/grafana/pkg/plugins/backend/shared"
proto "github.com/grafana/grafana/pkg/tsdb/models"
plugin "github.com/hashicorp/go-plugin"
)
......
......@@ -6,8 +6,8 @@ import (
"golang.org/x/net/context"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/tsdb/plugins/proto"
"github.com/grafana/grafana/pkg/tsdb/plugins/shared"
"github.com/grafana/grafana/pkg/plugins/backend/shared"
"github.com/grafana/grafana/pkg/tsdb/models"
plugin "github.com/hashicorp/go-plugin"
)
......@@ -25,7 +25,7 @@ func Init() (*plugin.Client, error) {
MagicCookieValue: "hello",
},
Plugins: shared.PluginMap,
Cmd: exec.Command("sh", "-c", "/home/carl/go/src/github.com/grafana/grafana/pkg/tsdb/plugins/mock_tsdb_plugin/simple-plugin"),
Cmd: exec.Command("sh", "-c", "/home/carl/go/src/github.com/grafana/grafana/pkg/plugins/backend/mock_tsdb_plugin/simple-plugin"),
AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC},
Logger: logWrapper{logger: logger},
})
......
package shared
import (
proto "github.com/grafana/grafana/pkg/tsdb/plugins/proto"
proto "github.com/grafana/grafana/pkg/tsdb/models"
"golang.org/x/net/context"
)
......
......@@ -3,7 +3,7 @@ package shared
import (
"golang.org/x/net/context"
proto "github.com/grafana/grafana/pkg/tsdb/plugins/proto"
proto "github.com/grafana/grafana/pkg/tsdb/models"
plugin "github.com/hashicorp/go-plugin"
"google.golang.org/grpc"
)
......
#/bin/sh
#protoc -I/usr/local/include -I. \
# -I$GOPATH/src \
# -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
# --go_out=google/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:. \
# pb/service.proto
#protoc -I/usr/local/include -I. \
# -I$GOPATH/src \
# -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
# --go_out=google/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:. \
# pb/service.proto
protoc -I proto/ proto/tsdb_plugin.proto --go_out=plugins=grpc:tsdb_plugin
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment