Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a2d47427
Commit
a2d47427
authored
Sep 21, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separate plugin impl and proto files
parent
0bc5bf53
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
12 additions
and
25 deletions
+12
-25
Makefile
+4
-0
pkg/cmd/grafana-server/server.go
+1
-1
pkg/plugins/backend/log-wrapper.go
+0
-0
pkg/plugins/backend/mock_tsdb_plugin/Makefile
+0
-0
pkg/plugins/backend/mock_tsdb_plugin/plugin.go
+2
-2
pkg/plugins/backend/mock_tsdb_plugin/simple-plugin
+0
-0
pkg/plugins/backend/plugins.go
+3
-3
pkg/plugins/backend/shared/grpc.go
+1
-1
pkg/plugins/backend/shared/interface.go
+1
-1
pkg/tsdb/models/tsdb_plugin.pb.go
+0
-0
pkg/tsdb/models/tsdb_plugin.proto
+0
-0
pkg/tsdb/plugins/generate.sh
+0
-17
No files found.
Makefile
View file @
a2d47427
...
...
@@ -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
pkg/cmd/grafana-server/server.go
View file @
a2d47427
...
...
@@ -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
{
...
...
pkg/
tsdb/plugins
/log-wrapper.go
→
pkg/
plugins/backend
/log-wrapper.go
View file @
a2d47427
File moved
pkg/
tsdb/plugins
/mock_tsdb_plugin/Makefile
→
pkg/
plugins/backend
/mock_tsdb_plugin/Makefile
View file @
a2d47427
File moved
pkg/
tsdb/plugins
/mock_tsdb_plugin/plugin.go
→
pkg/
plugins/backend
/mock_tsdb_plugin/plugin.go
View file @
a2d47427
...
...
@@ -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"
)
...
...
pkg/
tsdb/plugins
/mock_tsdb_plugin/simple-plugin
→
pkg/
plugins/backend
/mock_tsdb_plugin/simple-plugin
View file @
a2d47427
No preview for this file type
pkg/
tsdb/plugins
/plugins.go
→
pkg/
plugins/backend
/plugins.go
View file @
a2d47427
...
...
@@ -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
},
})
...
...
pkg/
tsdb/plugins
/shared/grpc.go
→
pkg/
plugins/backend
/shared/grpc.go
View file @
a2d47427
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"
)
...
...
pkg/
tsdb/plugins
/shared/interface.go
→
pkg/
plugins/backend
/shared/interface.go
View file @
a2d47427
...
...
@@ -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"
)
...
...
pkg/tsdb/
plugins/proto
/tsdb_plugin.pb.go
→
pkg/tsdb/
models
/tsdb_plugin.pb.go
View file @
a2d47427
File moved
pkg/tsdb/
plugins/proto
/tsdb_plugin.proto
→
pkg/tsdb/
models
/tsdb_plugin.proto
View file @
a2d47427
File moved
pkg/tsdb/plugins/generate.sh
deleted
100755 → 0
View file @
0bc5bf53
#/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment