Commit 4ff613a4 by Marcus Efraimsson Committed by GitHub

Backend Plugins: Support handling of streaming resource response (#22580)

Use v0.19.0 of SDK.
Support handling of streaming resource response.
Disable gzip/compression middleware for resources 
to allow chunked/streaming response to clients the gzip
middleware had to be disabled since it buffers the full
response before sending it to the client.

Closes #22569

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>
parent f95c8b78
......@@ -32,7 +32,7 @@ require (
github.com/gorilla/websocket v1.4.1
github.com/gosimple/slug v1.4.2
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
github.com/grafana/grafana-plugin-sdk-go v0.16.0
github.com/grafana/grafana-plugin-sdk-go v0.19.0
github.com/hashicorp/go-hclog v0.8.0
github.com/hashicorp/go-plugin v1.0.1
github.com/hashicorp/go-version v1.1.0
......
......@@ -133,10 +133,8 @@ github.com/gosimple/slug v1.4.2 h1:jDmprx3q/9Lfk4FkGZtvzDQ9Cj9eAmsjzeQGp24PeiQ=
github.com/gosimple/slug v1.4.2/go.mod h1:ER78kgg1Mv0NQGlXiDe57DpCyfbNywXXZ9mIorhxAf0=
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4 h1:SPdxCL9BChFTlyi0Khv64vdCW4TMna8+sxL7+Chx+Ag=
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4/go.mod h1:nc0XxBzjeGcrMltCDw269LoWF9S8ibhgxolCdA1R8To=
github.com/grafana/grafana-plugin-sdk-go v0.16.0 h1:fuoLzsQLs0RKcvXDP/cAQxaZGP1rbnoBwUaY/1yvh6k=
github.com/grafana/grafana-plugin-sdk-go v0.16.0/go.mod h1:D1MkO+4EPCWc1Wrr260hq7wbo7Ox0grnNWBygulq7aM=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grafana/grafana-plugin-sdk-go v0.19.0 h1:qLq8tOSxZ9O7+AdduXJVU6jEOlg/2eP8UXdhAzQ81g0=
github.com/grafana/grafana-plugin-sdk-go v0.19.0/go.mod h1:G6Ov9M+FDOZXNw8eKXINO6XzqdUvTs7huwyQp5jLTBQ=
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
github.com/hashicorp/go-hclog v0.8.0 h1:z3ollgGRg8RjfJH6UVBaG54R70GFd++QOkvnJH3VSBY=
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
......
......@@ -226,8 +226,8 @@ func (hs *HTTPServer) CheckHealth(c *models.ReqContext) Response {
}
payload := map[string]interface{}{
"status": resp.Status.String(),
"info": resp.Info,
"status": resp.Status.String(),
"message": resp.Message,
}
if resp.Status != backendplugin.HealthStatusOk {
......
......@@ -8,6 +8,8 @@ import (
"gopkg.in/macaron.v1"
)
const resourcesPath = "/resources"
func Gziper() macaron.Handler {
gziperLogger := log.New("gziper")
gziper := gzip.Gziper()
......@@ -27,6 +29,11 @@ func Gziper() macaron.Handler {
return
}
// ignore resources
if (strings.HasPrefix(requestPath, "/api/datasources/") || strings.HasPrefix(requestPath, "/api/plugins/")) && strings.Contains(requestPath, resourcesPath) {
return
}
if _, err := ctx.Invoke(gziper); err != nil {
gziperLogger.Error("Invoking gzip handler failed", "err", err)
}
......
......@@ -72,7 +72,7 @@ func (p *BackendPlugin) start(ctx context.Context) error {
if rawBackend != nil {
if plugin, ok := rawBackend.(CorePlugin); ok {
p.core = plugin
client.DatasourcePlugin = plugin
client.CorePlugin = plugin
}
}
......@@ -186,8 +186,8 @@ func (p *BackendPlugin) checkHealth(ctx context.Context) (*pluginv2.CheckHealth_
if st, ok := status.FromError(err); ok {
if st.Code() == codes.Unimplemented {
return &pluginv2.CheckHealth_Response{
Status: pluginv2.CheckHealth_Response_UNKNOWN,
Info: "Health check not implemented",
Status: pluginv2.CheckHealth_Response_UNKNOWN,
Message: "Health check not implemented",
}, nil
}
}
......@@ -197,9 +197,13 @@ func (p *BackendPlugin) checkHealth(ctx context.Context) (*pluginv2.CheckHealth_
return res, nil
}
func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceRequest) (*CallResourceResult, error) {
func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceRequest) (callResourceResultStream, error) {
p.logger.Debug("Calling resource", "path", req.Path, "method", req.Method)
if p.core == nil || p.client == nil || p.client.Exited() {
return nil, errors.New("plugin not running, cannot call resource")
}
reqHeaders := map[string]*pluginv2.CallResource_StringList{}
for k, v := range req.Headers {
reqHeaders[k] = &pluginv2.CallResource_StringList{Values: v}
......@@ -238,12 +242,14 @@ func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceReques
}
}
protoResp, err := p.core.CallResource(ctx, protoReq)
protoStream, err := p.core.CallResource(ctx, protoReq)
if err != nil {
if st, ok := status.FromError(err); ok {
if st.Code() == codes.Unimplemented {
return &CallResourceResult{
Status: http.StatusNotImplemented,
return &singleCallResourceResult{
result: &CallResourceResult{
Status: http.StatusNotImplemented,
},
}, nil
}
}
......@@ -251,15 +257,8 @@ func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceReques
return nil, errutil.Wrap("Failed to call resource", err)
}
respHeaders := map[string][]string{}
for key, values := range protoResp.Headers {
respHeaders[key] = values.Values
}
return &CallResourceResult{
Headers: respHeaders,
Body: protoResp.Body,
Status: int(protoResp.Code),
return &callResourceResultStreamImpl{
stream: protoStream,
}, nil
}
......
......@@ -102,17 +102,11 @@ func NewRendererPluginDescriptor(pluginID, executablePath string, startFns Plugi
}
type DiagnosticsPlugin interface {
CollectMetrics(ctx context.Context, req *pluginv2.CollectMetrics_Request) (*pluginv2.CollectMetrics_Response, error)
CheckHealth(ctx context.Context, req *pluginv2.CheckHealth_Request) (*pluginv2.CheckHealth_Response, error)
}
type DatasourcePlugin interface {
DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error)
plugin.DiagnosticsServer
}
type CorePlugin interface {
CallResource(ctx context.Context, req *pluginv2.CallResource_Request) (*pluginv2.CallResource_Response, error)
DatasourcePlugin
plugin.CoreClient
}
type TransformPlugin interface {
......@@ -127,6 +121,6 @@ type LegacyClient struct {
// Client client for communicating with a plugin using the current plugin protocol.
type Client struct {
DatasourcePlugin DatasourcePlugin
TransformPlugin TransformPlugin
CorePlugin CorePlugin
TransformPlugin TransformPlugin
}
......@@ -37,8 +37,8 @@ func (hs HealthStatus) String() string {
// CheckHealthResult check health result.
type CheckHealthResult struct {
Status HealthStatus
Info string
Status HealthStatus
Message string
}
func checkHealthResultFromProto(protoResp *pluginv2.CheckHealth_Response) *CheckHealthResult {
......@@ -51,8 +51,8 @@ func checkHealthResultFromProto(protoResp *pluginv2.CheckHealth_Response) *Check
}
return &CheckHealthResult{
Status: status,
Info: protoResp.Info,
Status: status,
Message: protoResp.Message,
}
}
......@@ -91,3 +91,46 @@ type CallResourceResult struct {
Headers map[string][]string
Body []byte
}
type callResourceResultStream interface {
Recv() (*CallResourceResult, error)
Close() error
}
type callResourceResultStreamImpl struct {
stream pluginv2.Core_CallResourceClient
}
func (s *callResourceResultStreamImpl) Recv() (*CallResourceResult, error) {
protoResp, err := s.stream.Recv()
if err != nil {
return nil, err
}
respHeaders := map[string][]string{}
for key, values := range protoResp.Headers {
respHeaders[key] = values.Values
}
return &CallResourceResult{
Headers: respHeaders,
Body: protoResp.Body,
Status: int(protoResp.Code),
}, nil
}
func (s *callResourceResultStreamImpl) Close() error {
return s.stream.CloseSend()
}
type singleCallResourceResult struct {
result *CallResourceResult
}
func (s *singleCallResourceResult) Recv() (*CallResourceResult, error) {
return s.result, nil
}
func (s *singleCallResourceResult) Close() error {
return nil
}
......@@ -3,6 +3,7 @@ package backendplugin
import (
"context"
"errors"
"io"
"sync"
"time"
......@@ -209,30 +210,59 @@ func (m *manager) CallResource(config PluginConfig, c *models.ReqContext, path s
Body: body,
}
res, err := p.callResource(clonedReq.Context(), req)
stream, err := p.callResource(clonedReq.Context(), req)
if err != nil {
c.JsonApiErr(500, "Failed to call resource", err)
return
}
// Make sure a content type always is returned in response
if _, exists := res.Headers["Content-Type"]; !exists {
res.Headers["Content-Type"] = []string{"application/json"}
}
processedStreams := 0
for k, values := range res.Headers {
if k == "Set-Cookie" {
continue
for {
resp, err := stream.Recv()
if err == io.EOF {
if processedStreams == 0 {
c.JsonApiErr(500, "Received empty resource response ", nil)
}
return
}
if err != nil {
if processedStreams == 0 {
c.JsonApiErr(500, "Failed to receive response from resource call", err)
} else {
p.logger.Error("Failed to receive response from resource call", "error", err)
}
return
}
// Expected that headers and status are only part of first stream
if processedStreams == 0 {
// Make sure a content type always is returned in response
if _, exists := resp.Headers["Content-Type"]; !exists {
resp.Headers["Content-Type"] = []string{"application/json"}
}
for k, values := range resp.Headers {
// Due to security reasons we don't want to forward
// cookies from a backend plugin to clients/browsers.
if k == "Set-Cookie" {
continue
}
for _, v := range values {
c.Resp.Header().Add(k, v)
}
}
c.WriteHeader(resp.Status)
}
for _, v := range values {
c.Resp.Header().Add(k, v)
if _, err := c.Write(resp.Body); err != nil {
p.logger.Error("Failed to write resource response", "error", err)
}
}
c.WriteHeader(res.Status)
if _, err := c.Write(res.Body); err != nil {
p.logger.Error("Failed to write resource response", "error", err)
c.Resp.Flush()
processedStreams++
}
}
......
......@@ -13,12 +13,12 @@ import (
"github.com/grafana/grafana/pkg/tsdb"
)
func NewDatasourcePluginWrapperV2(log log.Logger, pluginId, pluginType string, plugin backendplugin.DatasourcePlugin) *DatasourcePluginWrapperV2 {
return &DatasourcePluginWrapperV2{DatasourcePlugin: plugin, logger: log, pluginId: pluginId, pluginType: pluginType}
func NewDatasourcePluginWrapperV2(log log.Logger, pluginId, pluginType string, plugin backendplugin.CorePlugin) *DatasourcePluginWrapperV2 {
return &DatasourcePluginWrapperV2{CorePlugin: plugin, logger: log, pluginId: pluginId, pluginType: pluginType}
}
type DatasourcePluginWrapperV2 struct {
backendplugin.DatasourcePlugin
backendplugin.CorePlugin
logger log.Logger
pluginId string
pluginType string
......@@ -68,7 +68,7 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
})
}
pbRes, err := tw.DatasourcePlugin.DataQuery(ctx, pbQuery)
pbRes, err := tw.CorePlugin.DataQuery(ctx, pbQuery)
if err != nil {
return nil, err
}
......
......@@ -68,9 +68,9 @@ func (p *DataSourcePlugin) onLegacyPluginStart(pluginID string, client *backendp
}
func (p *DataSourcePlugin) onPluginStart(pluginID string, client *backendplugin.Client, logger log.Logger) error {
if client.DatasourcePlugin != nil {
if client.CorePlugin != nil {
tsdb.RegisterTsdbQueryEndpoint(pluginID, func(dsInfo *models.DataSource) (tsdb.TsdbQueryEndpoint, error) {
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.DatasourcePlugin), nil
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.CorePlugin), nil
})
}
......
......@@ -53,9 +53,9 @@ func (p *TransformPlugin) Load(decoder *json.Decoder, pluginDir string, backendP
func (p *TransformPlugin) onPluginStart(pluginID string, client *backendplugin.Client, logger log.Logger) error {
p.TransformWrapper = NewTransformWrapper(logger, client.TransformPlugin)
if client.DatasourcePlugin != nil {
if client.CorePlugin != nil {
tsdb.RegisterTsdbQueryEndpoint(pluginID, func(dsInfo *models.DataSource) (tsdb.TsdbQueryEndpoint, error) {
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.DatasourcePlugin), nil
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.CorePlugin), nil
})
}
......
......@@ -12,6 +12,10 @@ type CoreServer interface {
pluginv2.CoreServer
}
type CoreClient interface {
pluginv2.CoreClient
}
// CoreGRPCPlugin implements the GRPCPlugin interface from github.com/hashicorp/go-plugin.
type CoreGRPCPlugin struct {
plugin.NetRPCUnsupportedPlugin
......@@ -38,21 +42,21 @@ func (s *coreGRPCServer) DataQuery(ctx context.Context, req *pluginv2.DataQueryR
return s.server.DataQuery(ctx, req)
}
func (s *coreGRPCServer) CallResource(ctx context.Context, req *pluginv2.CallResource_Request) (*pluginv2.CallResource_Response, error) {
return s.server.CallResource(ctx, req)
func (s *coreGRPCServer) CallResource(req *pluginv2.CallResource_Request, srv pluginv2.Core_CallResourceServer) error {
return s.server.CallResource(req, srv)
}
type coreGRPCClient struct {
client pluginv2.CoreClient
}
func (m *coreGRPCClient) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error) {
return m.client.DataQuery(ctx, req)
func (m *coreGRPCClient) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest, opts ...grpc.CallOption) (*pluginv2.DataQueryResponse, error) {
return m.client.DataQuery(ctx, req, opts...)
}
func (m *coreGRPCClient) CallResource(ctx context.Context, req *pluginv2.CallResource_Request) (*pluginv2.CallResource_Response, error) {
return m.client.CallResource(ctx, req)
func (m *coreGRPCClient) CallResource(ctx context.Context, req *pluginv2.CallResource_Request, opts ...grpc.CallOption) (pluginv2.Core_CallResourceClient, error) {
return m.client.CallResource(ctx, req, opts...)
}
var _ CoreServer = &coreGRPCServer{}
var _ CoreServer = &coreGRPCClient{}
var _ CoreClient = &coreGRPCClient{}
......@@ -200,6 +200,13 @@ func buildArrowSchema(f *Frame, fs []arrow.Field) (*arrow.Schema, error) {
}
tableMetaMap["meta"] = str
}
if len(f.Warnings) > 0 {
str, err := toJSONString(f.Warnings)
if err != nil {
return nil, err
}
tableMetaMap["warnings"] = str
}
tableMeta := arrow.MetadataFrom(tableMetaMap)
return arrow.NewSchema(fs, &tableMeta), nil
......@@ -633,6 +640,14 @@ func UnmarshalArrow(b []byte) (*Frame, error) {
}
}
if warningsAsString, ok := getMDKey("warnings", metaData); ok {
var err error
frame.Warnings, err = WarningsFromJSON(warningsAsString)
if err != nil {
return nil, err
}
}
nullable, err := initializeFrameFields(schema, frame)
if err != nil {
return nil, err
......
......@@ -12,8 +12,9 @@ type Frame struct {
Name string
Fields []*Field
RefID string
Meta *QueryResultMeta
RefID string
Meta *QueryResultMeta
Warnings []Warning
}
// Field represents a column of data with a specific type.
......@@ -38,6 +39,11 @@ func (f *Frame) AppendRow(vals ...interface{}) {
}
}
// AppendWarning adds warnings to the data frame.
func (f *Frame) AppendWarning(message string, details string) {
f.Warnings = append(f.Warnings, Warning{Message: message, Details: details})
}
// AppendRowSafe adds a new row to the Frame by appending to each each element of vals to
// the corresponding Field in the dataframe. It has the some constraints as AppendRow but will
// return an error under those conditions instead of panicing.
......
package dataframe
import "encoding/json"
// Warning contains information about problems in a dataframe.
type Warning struct {
// Short message (typically shown in the header)
Message string `json:"message,omitempty"`
// longer error message, shown in the body
Details string `json:"details,omitempty"`
}
// WarningsFromJSON creates a *Warning from a json string.
func WarningsFromJSON(jsonStr string) ([]Warning, error) {
var m []Warning
err := json.Unmarshal([]byte(jsonStr), &m)
if err != nil {
return nil, err
}
return m, nil
}
......@@ -50,7 +50,7 @@ func (x CheckHealth_Response_HealthStatus) String() string {
}
func (CheckHealth_Response_HealthStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8, 1, 0}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{9, 1, 0}
}
type DataSourceConfig struct {
......@@ -345,23 +345,88 @@ func (m *DataQuery) GetJson() []byte {
return nil
}
type User struct {
Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (*User) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{4}
}
func (m *User) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_User.Unmarshal(m, b)
}
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_User.Marshal(b, m, deterministic)
}
func (m *User) XXX_Merge(src proto.Message) {
xxx_messageInfo_User.Merge(m, src)
}
func (m *User) XXX_Size() int {
return xxx_messageInfo_User.Size(m)
}
func (m *User) XXX_DiscardUnknown() {
xxx_messageInfo_User.DiscardUnknown(m)
}
var xxx_messageInfo_User proto.InternalMessageInfo
func (m *User) GetLogin() string {
if m != nil {
return m.Login
}
return ""
}
func (m *User) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *User) GetEmail() string {
if m != nil {
return m.Email
}
return ""
}
func (m *User) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
type DataQueryRequest struct {
// Plugin Configuration
Config *PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
// Environment info
Headers map[string]string `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// List of queries
Queries []*DataQuery `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Queries []*DataQuery `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"`
//Info about the user who calls the plugin.
User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataQueryRequest) Reset() { *m = DataQueryRequest{} }
func (m *DataQueryRequest) String() string { return proto.CompactTextString(m) }
func (*DataQueryRequest) ProtoMessage() {}
func (*DataQueryRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{4}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{5}
}
func (m *DataQueryRequest) XXX_Unmarshal(b []byte) error {
......@@ -403,6 +468,13 @@ func (m *DataQueryRequest) GetQueries() []*DataQuery {
return nil
}
func (m *DataQueryRequest) GetUser() *User {
if m != nil {
return m.User
}
return nil
}
type DataQueryResponse struct {
// Arrow encoded DataFrames
// Each frame encodes its own: Errors, meta, and refId
......@@ -418,7 +490,7 @@ func (m *DataQueryResponse) Reset() { *m = DataQueryResponse{} }
func (m *DataQueryResponse) String() string { return proto.CompactTextString(m) }
func (*DataQueryResponse) ProtoMessage() {}
func (*DataQueryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{5}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{6}
}
func (m *DataQueryResponse) XXX_Unmarshal(b []byte) error {
......@@ -463,7 +535,7 @@ func (m *CallResource) Reset() { *m = CallResource{} }
func (m *CallResource) String() string { return proto.CompactTextString(m) }
func (*CallResource) ProtoMessage() {}
func (*CallResource) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{6}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7}
}
func (m *CallResource) XXX_Unmarshal(b []byte) error {
......@@ -495,7 +567,7 @@ func (m *CallResource_StringList) Reset() { *m = CallResource_StringList
func (m *CallResource_StringList) String() string { return proto.CompactTextString(m) }
func (*CallResource_StringList) ProtoMessage() {}
func (*CallResource_StringList) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{6, 0}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7, 0}
}
func (m *CallResource_StringList) XXX_Unmarshal(b []byte) error {
......@@ -530,6 +602,7 @@ type CallResource_Request struct {
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
Headers map[string]*CallResource_StringList `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Body []byte `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"`
User *User `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -539,7 +612,7 @@ func (m *CallResource_Request) Reset() { *m = CallResource_Request{} }
func (m *CallResource_Request) String() string { return proto.CompactTextString(m) }
func (*CallResource_Request) ProtoMessage() {}
func (*CallResource_Request) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{6, 1}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7, 1}
}
func (m *CallResource_Request) XXX_Unmarshal(b []byte) error {
......@@ -602,6 +675,13 @@ func (m *CallResource_Request) GetBody() []byte {
return nil
}
func (m *CallResource_Request) GetUser() *User {
if m != nil {
return m.User
}
return nil
}
type CallResource_Response struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Headers map[string]*CallResource_StringList `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
......@@ -615,7 +695,7 @@ func (m *CallResource_Response) Reset() { *m = CallResource_Response{} }
func (m *CallResource_Response) String() string { return proto.CompactTextString(m) }
func (*CallResource_Response) ProtoMessage() {}
func (*CallResource_Response) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{6, 2}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7, 2}
}
func (m *CallResource_Response) XXX_Unmarshal(b []byte) error {
......@@ -667,7 +747,7 @@ func (m *CollectMetrics) Reset() { *m = CollectMetrics{} }
func (m *CollectMetrics) String() string { return proto.CompactTextString(m) }
func (*CollectMetrics) ProtoMessage() {}
func (*CollectMetrics) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8}
}
func (m *CollectMetrics) XXX_Unmarshal(b []byte) error {
......@@ -698,7 +778,7 @@ func (m *CollectMetrics_Request) Reset() { *m = CollectMetrics_Request{}
func (m *CollectMetrics_Request) String() string { return proto.CompactTextString(m) }
func (*CollectMetrics_Request) ProtoMessage() {}
func (*CollectMetrics_Request) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7, 0}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8, 0}
}
func (m *CollectMetrics_Request) XXX_Unmarshal(b []byte) error {
......@@ -730,7 +810,7 @@ func (m *CollectMetrics_Payload) Reset() { *m = CollectMetrics_Payload{}
func (m *CollectMetrics_Payload) String() string { return proto.CompactTextString(m) }
func (*CollectMetrics_Payload) ProtoMessage() {}
func (*CollectMetrics_Payload) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7, 1}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8, 1}
}
func (m *CollectMetrics_Payload) XXX_Unmarshal(b []byte) error {
......@@ -769,7 +849,7 @@ func (m *CollectMetrics_Response) Reset() { *m = CollectMetrics_Response
func (m *CollectMetrics_Response) String() string { return proto.CompactTextString(m) }
func (*CollectMetrics_Response) ProtoMessage() {}
func (*CollectMetrics_Response) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{7, 2}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8, 2}
}
func (m *CollectMetrics_Response) XXX_Unmarshal(b []byte) error {
......@@ -807,7 +887,7 @@ func (m *CheckHealth) Reset() { *m = CheckHealth{} }
func (m *CheckHealth) String() string { return proto.CompactTextString(m) }
func (*CheckHealth) ProtoMessage() {}
func (*CheckHealth) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{9}
}
func (m *CheckHealth) XXX_Unmarshal(b []byte) error {
......@@ -829,16 +909,17 @@ func (m *CheckHealth) XXX_DiscardUnknown() {
var xxx_messageInfo_CheckHealth proto.InternalMessageInfo
type CheckHealth_Request struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Config *PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CheckHealth_Request) Reset() { *m = CheckHealth_Request{} }
func (m *CheckHealth_Request) String() string { return proto.CompactTextString(m) }
func (*CheckHealth_Request) ProtoMessage() {}
func (*CheckHealth_Request) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8, 0}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{9, 0}
}
func (m *CheckHealth_Request) XXX_Unmarshal(b []byte) error {
......@@ -859,9 +940,17 @@ func (m *CheckHealth_Request) XXX_DiscardUnknown() {
var xxx_messageInfo_CheckHealth_Request proto.InternalMessageInfo
func (m *CheckHealth_Request) GetConfig() *PluginConfig {
if m != nil {
return m.Config
}
return nil
}
type CheckHealth_Response struct {
Status CheckHealth_Response_HealthStatus `protobuf:"varint,1,opt,name=status,proto3,enum=pluginv2.CheckHealth_Response_HealthStatus" json:"status,omitempty"`
Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
JsonDetails string `protobuf:"bytes,3,opt,name=jsonDetails,proto3" json:"jsonDetails,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -871,7 +960,7 @@ func (m *CheckHealth_Response) Reset() { *m = CheckHealth_Response{} }
func (m *CheckHealth_Response) String() string { return proto.CompactTextString(m) }
func (*CheckHealth_Response) ProtoMessage() {}
func (*CheckHealth_Response) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{8, 1}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{9, 1}
}
func (m *CheckHealth_Response) XXX_Unmarshal(b []byte) error {
......@@ -899,9 +988,16 @@ func (m *CheckHealth_Response) GetStatus() CheckHealth_Response_HealthStatus {
return CheckHealth_Response_UNKNOWN
}
func (m *CheckHealth_Response) GetInfo() string {
func (m *CheckHealth_Response) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func (m *CheckHealth_Response) GetJsonDetails() string {
if m != nil {
return m.Info
return m.JsonDetails
}
return ""
}
......@@ -925,7 +1021,7 @@ func (m *StreamingRequest) Reset() { *m = StreamingRequest{} }
func (m *StreamingRequest) String() string { return proto.CompactTextString(m) }
func (*StreamingRequest) ProtoMessage() {}
func (*StreamingRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{9}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{10}
}
func (m *StreamingRequest) XXX_Unmarshal(b []byte) error {
......@@ -994,7 +1090,7 @@ func (m *StreamingMessage) Reset() { *m = StreamingMessage{} }
func (m *StreamingMessage) String() string { return proto.CompactTextString(m) }
func (*StreamingMessage) ProtoMessage() {}
func (*StreamingMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{10}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{11}
}
func (m *StreamingMessage) XXX_Unmarshal(b []byte) error {
......@@ -1047,7 +1143,7 @@ func (m *StreamingClose) Reset() { *m = StreamingClose{} }
func (m *StreamingClose) String() string { return proto.CompactTextString(m) }
func (*StreamingClose) ProtoMessage() {}
func (*StreamingClose) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{11}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{12}
}
func (m *StreamingClose) XXX_Unmarshal(b []byte) error {
......@@ -1094,7 +1190,7 @@ func (m *RenderRequest) Reset() { *m = RenderRequest{} }
func (m *RenderRequest) String() string { return proto.CompactTextString(m) }
func (*RenderRequest) ProtoMessage() {}
func (*RenderRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{12}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{13}
}
func (m *RenderRequest) XXX_Unmarshal(b []byte) error {
......@@ -1189,7 +1285,7 @@ func (m *RenderResponse) Reset() { *m = RenderResponse{} }
func (m *RenderResponse) String() string { return proto.CompactTextString(m) }
func (*RenderResponse) ProtoMessage() {}
func (*RenderResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{13}
return fileDescriptor_5ab9ba5b8d8b2ba5, []int{14}
}
func (m *RenderResponse) XXX_Unmarshal(b []byte) error {
......@@ -1224,6 +1320,7 @@ func init() {
proto.RegisterMapType((map[string]string)(nil), "pluginv2.PluginConfig.DecryptedSecureJsonDataEntry")
proto.RegisterType((*TimeRange)(nil), "pluginv2.TimeRange")
proto.RegisterType((*DataQuery)(nil), "pluginv2.DataQuery")
proto.RegisterType((*User)(nil), "pluginv2.User")
proto.RegisterType((*DataQueryRequest)(nil), "pluginv2.DataQueryRequest")
proto.RegisterMapType((map[string]string)(nil), "pluginv2.DataQueryRequest.HeadersEntry")
proto.RegisterType((*DataQueryResponse)(nil), "pluginv2.DataQueryResponse")
......@@ -1252,93 +1349,99 @@ func init() {
func init() { proto.RegisterFile("backend.proto", fileDescriptor_5ab9ba5b8d8b2ba5) }
var fileDescriptor_5ab9ba5b8d8b2ba5 = []byte{
// 1375 bytes of a gzipped FileDescriptorProto
// 1463 bytes of a gzipped FileD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xf2, 0x37, 0xdd,
0x69, 0x1d, 0x61, 0x41, 0x31, 0x57, 0xf7, 0xa6, 0x84, 0x86, 0xec, 0x56, 0xca, 0xd1, 0x55, 0x58,
0xd3, 0x6b, 0x74, 0x3a, 0xdf, 0xbf, 0x40, 0x60, 0x45, 0x43, 0x8b, 0x4d, 0x7e, 0xbd, 0xf1, 0x18,
0x3a, 0x57, 0xd3, 0x8f, 0xa3, 0x35, 0xe5, 0xc0, 0xe5, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4e,
0xe4, 0x8d, 0xf6, 0x50, 0x10, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
......@@ -1354,7 +1457,7 @@ const _ = grpc.SupportPackageIsVersion4
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CoreClient interface {
// HTTP Style request
CallResource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (*CallResource_Response, error)
CallResource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (Core_CallResourceClient, error)
// Well typed query interface
DataQuery(ctx context.Context, in *DataQueryRequest, opts ...grpc.CallOption) (*DataQueryResponse, error)
}
......@@ -1367,13 +1470,36 @@ func NewCoreClient(cc *grpc.ClientConn) CoreClient {
return &coreClient{cc}
}
func (c *coreClient) CallResource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (*CallResource_Response, error) {
out := new(CallResource_Response)
err := c.cc.Invoke(ctx, "/pluginv2.Core/CallResource", in, out, opts...)
func (c *coreClient) CallResource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (Core_CallResourceClient, error) {
stream, err := c.cc.NewStream(ctx, &_Core_serviceDesc.Streams[0], "/pluginv2.Core/CallResource", opts...)
if err != nil {
return nil, err
}
return out, nil
x := &coreCallResourceClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Core_CallResourceClient interface {
Recv() (*CallResource_Response, error)
grpc.ClientStream
}
type coreCallResourceClient struct {
grpc.ClientStream
}
func (x *coreCallResourceClient) Recv() (*CallResource_Response, error) {
m := new(CallResource_Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *coreClient) DataQuery(ctx context.Context, in *DataQueryRequest, opts ...grpc.CallOption) (*DataQueryResponse, error) {
......@@ -1388,7 +1514,7 @@ func (c *coreClient) DataQuery(ctx context.Context, in *DataQueryRequest, opts .
// CoreServer is the server API for Core service.
type CoreServer interface {
// HTTP Style request
CallResource(context.Context, *CallResource_Request) (*CallResource_Response, error)
CallResource(*CallResource_Request, Core_CallResourceServer) error
// Well typed query interface
DataQuery(context.Context, *DataQueryRequest) (*DataQueryResponse, error)
}
......@@ -1397,8 +1523,8 @@ type CoreServer interface {
type UnimplementedCoreServer struct {
}
func (*UnimplementedCoreServer) CallResource(ctx context.Context, req *CallResource_Request) (*CallResource_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method CallResource not implemented")
func (*UnimplementedCoreServer) CallResource(req *CallResource_Request, srv Core_CallResourceServer) error {
return status.Errorf(codes.Unimplemented, "method CallResource not implemented")
}
func (*UnimplementedCoreServer) DataQuery(ctx context.Context, req *DataQueryRequest) (*DataQueryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DataQuery not implemented")
......@@ -1408,22 +1534,25 @@ func RegisterCoreServer(s *grpc.Server, srv CoreServer) {
s.RegisterService(&_Core_serviceDesc, srv)
}
func _Core_CallResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CallResource_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CoreServer).CallResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pluginv2.Core/CallResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CoreServer).CallResource(ctx, req.(*CallResource_Request))
func _Core_CallResource_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(CallResource_Request)
if err := stream.RecvMsg(m); err != nil {
return err
}
return interceptor(ctx, in, info, handler)
return srv.(CoreServer).CallResource(m, &coreCallResourceServer{stream})
}
type Core_CallResourceServer interface {
Send(*CallResource_Response) error
grpc.ServerStream
}
type coreCallResourceServer struct {
grpc.ServerStream
}
func (x *coreCallResourceServer) Send(m *CallResource_Response) error {
return x.ServerStream.SendMsg(m)
}
func _Core_DataQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
......@@ -1449,15 +1578,17 @@ var _Core_serviceDesc = grpc.ServiceDesc{
HandlerType: (*CoreServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CallResource",
Handler: _Core_CallResource_Handler,
},
{
MethodName: "DataQuery",
Handler: _Core_DataQuery_Handler,
},
},
Streams: []grpc.StreamDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "CallResource",
Handler: _Core_CallResource_Handler,
ServerStreams: true,
},
},
Metadata: "backend.proto",
}
......@@ -1573,7 +1704,7 @@ var _Diagnostics_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GrafanaPlatformClient interface {
Resource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (*CallResource_Response, error)
Resource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (GrafanaPlatform_ResourceClient, error)
DataQuery(ctx context.Context, in *DataQueryRequest, opts ...grpc.CallOption) (*DataQueryResponse, error)
}
......@@ -1585,13 +1716,36 @@ func NewGrafanaPlatformClient(cc *grpc.ClientConn) GrafanaPlatformClient {
return &grafanaPlatformClient{cc}
}
func (c *grafanaPlatformClient) Resource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (*CallResource_Response, error) {
out := new(CallResource_Response)
err := c.cc.Invoke(ctx, "/pluginv2.GrafanaPlatform/Resource", in, out, opts...)
func (c *grafanaPlatformClient) Resource(ctx context.Context, in *CallResource_Request, opts ...grpc.CallOption) (GrafanaPlatform_ResourceClient, error) {
stream, err := c.cc.NewStream(ctx, &_GrafanaPlatform_serviceDesc.Streams[0], "/pluginv2.GrafanaPlatform/Resource", opts...)
if err != nil {
return nil, err
}
return out, nil
x := &grafanaPlatformResourceClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type GrafanaPlatform_ResourceClient interface {
Recv() (*CallResource_Response, error)
grpc.ClientStream
}
type grafanaPlatformResourceClient struct {
grpc.ClientStream
}
func (x *grafanaPlatformResourceClient) Recv() (*CallResource_Response, error) {
m := new(CallResource_Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *grafanaPlatformClient) DataQuery(ctx context.Context, in *DataQueryRequest, opts ...grpc.CallOption) (*DataQueryResponse, error) {
......@@ -1605,7 +1759,7 @@ func (c *grafanaPlatformClient) DataQuery(ctx context.Context, in *DataQueryRequ
// GrafanaPlatformServer is the server API for GrafanaPlatform service.
type GrafanaPlatformServer interface {
Resource(context.Context, *CallResource_Request) (*CallResource_Response, error)
Resource(*CallResource_Request, GrafanaPlatform_ResourceServer) error
DataQuery(context.Context, *DataQueryRequest) (*DataQueryResponse, error)
}
......@@ -1613,8 +1767,8 @@ type GrafanaPlatformServer interface {
type UnimplementedGrafanaPlatformServer struct {
}
func (*UnimplementedGrafanaPlatformServer) Resource(ctx context.Context, req *CallResource_Request) (*CallResource_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Resource not implemented")
func (*UnimplementedGrafanaPlatformServer) Resource(req *CallResource_Request, srv GrafanaPlatform_ResourceServer) error {
return status.Errorf(codes.Unimplemented, "method Resource not implemented")
}
func (*UnimplementedGrafanaPlatformServer) DataQuery(ctx context.Context, req *DataQueryRequest) (*DataQueryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DataQuery not implemented")
......@@ -1624,22 +1778,25 @@ func RegisterGrafanaPlatformServer(s *grpc.Server, srv GrafanaPlatformServer) {
s.RegisterService(&_GrafanaPlatform_serviceDesc, srv)
}
func _GrafanaPlatform_Resource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CallResource_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GrafanaPlatformServer).Resource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pluginv2.GrafanaPlatform/Resource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrafanaPlatformServer).Resource(ctx, req.(*CallResource_Request))
func _GrafanaPlatform_Resource_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(CallResource_Request)
if err := stream.RecvMsg(m); err != nil {
return err
}
return interceptor(ctx, in, info, handler)
return srv.(GrafanaPlatformServer).Resource(m, &grafanaPlatformResourceServer{stream})
}
type GrafanaPlatform_ResourceServer interface {
Send(*CallResource_Response) error
grpc.ServerStream
}
type grafanaPlatformResourceServer struct {
grpc.ServerStream
}
func (x *grafanaPlatformResourceServer) Send(m *CallResource_Response) error {
return x.ServerStream.SendMsg(m)
}
func _GrafanaPlatform_DataQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
......@@ -1665,15 +1822,17 @@ var _GrafanaPlatform_serviceDesc = grpc.ServiceDesc{
HandlerType: (*GrafanaPlatformServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Resource",
Handler: _GrafanaPlatform_Resource_Handler,
},
{
MethodName: "DataQuery",
Handler: _GrafanaPlatform_DataQuery_Handler,
},
},
Streams: []grpc.StreamDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Resource",
Handler: _GrafanaPlatform_Resource_Handler,
ServerStreams: true,
},
},
Metadata: "backend.proto",
}
......
......@@ -148,7 +148,7 @@ github.com/gosimple/slug
# github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
github.com/grafana/grafana-plugin-model/go/datasource
github.com/grafana/grafana-plugin-model/go/renderer
# github.com/grafana/grafana-plugin-sdk-go v0.16.0
# github.com/grafana/grafana-plugin-sdk-go v0.19.0
github.com/grafana/grafana-plugin-sdk-go/backend/plugin
github.com/grafana/grafana-plugin-sdk-go/dataframe
github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2
......
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