mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
moves datasource plugin model to grafana/grafana_plugin_model
This commit is contained in:
parent
af9d1cc577
commit
a183ea97bb
@ -1,23 +0,0 @@
|
||||
package tsdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
proto "github.com/grafana/grafana/pkg/tsdb/models"
|
||||
)
|
||||
|
||||
type GRPCClient struct {
|
||||
proto.TsdbPluginClient
|
||||
}
|
||||
|
||||
func (m *GRPCClient) Query(ctx context.Context, req *proto.TsdbQuery) (*proto.Response, error) {
|
||||
return m.TsdbPluginClient.Query(ctx, req)
|
||||
}
|
||||
|
||||
type GRPCServer struct {
|
||||
TsdbPlugin
|
||||
}
|
||||
|
||||
func (m *GRPCServer) Query(ctx context.Context, req *proto.TsdbQuery) (*proto.Response, error) {
|
||||
return m.TsdbPlugin.Query(ctx, req)
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package tsdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
proto "github.com/grafana/grafana/pkg/tsdb/models"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type TsdbPlugin interface {
|
||||
Query(ctx context.Context, req *proto.TsdbQuery) (*proto.Response, error)
|
||||
}
|
||||
|
||||
type TsdbPluginImpl struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
Plugin TsdbPlugin
|
||||
}
|
||||
|
||||
func (p *TsdbPluginImpl) GRPCServer(s *grpc.Server) error {
|
||||
proto.RegisterTsdbPluginServer(s, &GRPCServer{p.Plugin})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *TsdbPluginImpl) GRPCClient(c *grpc.ClientConn) (interface{}, error) {
|
||||
return &GRPCClient{proto.NewTsdbPluginClient(c)}, nil
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package tsdb
|
||||
package wrapper
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -8,16 +8,15 @@ import (
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/tsdb"
|
||||
proto "github.com/grafana/grafana/pkg/tsdb/models"
|
||||
"github.com/grafana/grafana_plugin_model/go/datasource"
|
||||
)
|
||||
|
||||
func NewDatasourcePluginWrapper(log log.Logger, plugin TsdbPlugin) *DatasourcePluginWrapper {
|
||||
return &DatasourcePluginWrapper{TsdbPlugin: plugin, logger: log}
|
||||
func NewDatasourcePluginWrapper(log log.Logger, plugin datasource.DatasourcePlugin) *DatasourcePluginWrapper {
|
||||
return &DatasourcePluginWrapper{DatasourcePlugin: plugin, logger: log}
|
||||
}
|
||||
|
||||
type DatasourcePluginWrapper struct {
|
||||
TsdbPlugin
|
||||
|
||||
datasource.DatasourcePlugin
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
@ -27,8 +26,8 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pbQuery := &proto.TsdbQuery{
|
||||
Datasource: &proto.DatasourceInfo{
|
||||
pbQuery := &datasource.DatasourceRequest{
|
||||
Datasource: &datasource.DatasourceInfo{
|
||||
JsonData: string(jsonData),
|
||||
Name: ds.Name,
|
||||
Type: ds.Type,
|
||||
@ -36,19 +35,19 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou
|
||||
Id: ds.Id,
|
||||
OrgId: ds.OrgId,
|
||||
},
|
||||
TimeRange: &proto.TimeRange{
|
||||
TimeRange: &datasource.TimeRange{
|
||||
FromRaw: query.TimeRange.From,
|
||||
ToRaw: query.TimeRange.To,
|
||||
ToEpochMs: query.TimeRange.GetToAsMsEpoch(),
|
||||
FromEpochMs: query.TimeRange.GetFromAsMsEpoch(),
|
||||
},
|
||||
Queries: []*proto.Query{},
|
||||
Queries: []*datasource.Query{},
|
||||
}
|
||||
|
||||
for _, q := range query.Queries {
|
||||
modelJson, _ := q.Model.MarshalJSON()
|
||||
|
||||
pbQuery.Queries = append(pbQuery.Queries, &proto.Query{
|
||||
pbQuery.Queries = append(pbQuery.Queries, &datasource.Query{
|
||||
ModelJson: string(modelJson),
|
||||
IntervalMs: q.IntervalMs,
|
||||
RefId: q.RefId,
|
||||
@ -56,7 +55,7 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou
|
||||
})
|
||||
}
|
||||
|
||||
pbres, err := tw.TsdbPlugin.Query(ctx, pbQuery)
|
||||
pbres, err := tw.DatasourcePlugin.Query(ctx, pbQuery)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -96,7 +95,7 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou
|
||||
|
||||
return res, nil
|
||||
}
|
||||
func (tw *DatasourcePluginWrapper) mapTables(r *proto.QueryResult) ([]*tsdb.Table, error) {
|
||||
func (tw *DatasourcePluginWrapper) mapTables(r *datasource.QueryResult) ([]*tsdb.Table, error) {
|
||||
var tables []*tsdb.Table
|
||||
for _, t := range r.GetTables() {
|
||||
mappedTable, err := tw.mapTable(t)
|
||||
@ -108,7 +107,7 @@ func (tw *DatasourcePluginWrapper) mapTables(r *proto.QueryResult) ([]*tsdb.Tabl
|
||||
return tables, nil
|
||||
}
|
||||
|
||||
func (tw *DatasourcePluginWrapper) mapTable(t *proto.Table) (*tsdb.Table, error) {
|
||||
func (tw *DatasourcePluginWrapper) mapTable(t *datasource.Table) (*tsdb.Table, error) {
|
||||
table := &tsdb.Table{}
|
||||
for _, c := range t.GetColumns() {
|
||||
table.Columns = append(table.Columns, tsdb.TableColumn{
|
||||
@ -131,19 +130,19 @@ func (tw *DatasourcePluginWrapper) mapTable(t *proto.Table) (*tsdb.Table, error)
|
||||
|
||||
return table, nil
|
||||
}
|
||||
func (tw *DatasourcePluginWrapper) mapRowValue(rv *proto.RowValue) (interface{}, error) {
|
||||
func (tw *DatasourcePluginWrapper) mapRowValue(rv *datasource.RowValue) (interface{}, error) {
|
||||
switch rv.Kind {
|
||||
case proto.RowValue_TYPE_NULL:
|
||||
case datasource.RowValue_TYPE_NULL:
|
||||
return nil, nil
|
||||
case proto.RowValue_TYPE_INT64:
|
||||
case datasource.RowValue_TYPE_INT64:
|
||||
return rv.Int64Value, nil
|
||||
case proto.RowValue_TYPE_BOOL:
|
||||
case datasource.RowValue_TYPE_BOOL:
|
||||
return rv.BoolValue, nil
|
||||
case proto.RowValue_TYPE_STRING:
|
||||
case datasource.RowValue_TYPE_STRING:
|
||||
return rv.StringValue, nil
|
||||
case proto.RowValue_TYPE_DOUBLE:
|
||||
case datasource.RowValue_TYPE_DOUBLE:
|
||||
return rv.DoubleValue, nil
|
||||
case proto.RowValue_TYPE_BYTES:
|
||||
case datasource.RowValue_TYPE_BYTES:
|
||||
return rv.BytesValue, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("Unsupported row value %v from plugin", rv.Kind)
|
@ -1,17 +1,18 @@
|
||||
package tsdb
|
||||
package wrapper
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
"github.com/grafana/grafana/pkg/tsdb"
|
||||
"github.com/grafana/grafana/pkg/tsdb/models"
|
||||
"testing"
|
||||
"github.com/grafana/grafana_plugin_model/go/datasource"
|
||||
)
|
||||
|
||||
func TestMapTables(t *testing.T) {
|
||||
dpw := NewDatasourcePluginWrapper(log.New("test-logger"), nil)
|
||||
var qr = &proto.QueryResult{}
|
||||
qr.Tables = append(qr.Tables, &proto.Table{
|
||||
Columns: []*proto.TableColumn{},
|
||||
var qr = &datasource.QueryResult{}
|
||||
qr.Tables = append(qr.Tables, &datasource.Table{
|
||||
Columns: []*datasource.TableColumn{},
|
||||
Rows: nil,
|
||||
})
|
||||
want := []*tsdb.Table{{}}
|
||||
@ -28,16 +29,16 @@ func TestMapTables(t *testing.T) {
|
||||
func TestMapTable(t *testing.T) {
|
||||
dpw := NewDatasourcePluginWrapper(log.New("test-logger"), nil)
|
||||
|
||||
source := &proto.Table{
|
||||
Columns: []*proto.TableColumn{{Name: "column1"}, {Name: "column2"}},
|
||||
Rows: []*proto.TableRow{{
|
||||
Values: []*proto.RowValue{
|
||||
source := &datasource.Table{
|
||||
Columns: []*datasource.TableColumn{{Name: "column1"}, {Name: "column2"}},
|
||||
Rows: []*datasource.TableRow{{
|
||||
Values: []*datasource.RowValue{
|
||||
{
|
||||
Kind: proto.RowValue_TYPE_BOOL,
|
||||
Kind: datasource.RowValue_TYPE_BOOL,
|
||||
BoolValue: true,
|
||||
},
|
||||
{
|
||||
Kind: proto.RowValue_TYPE_INT64,
|
||||
Kind: datasource.RowValue_TYPE_INT64,
|
||||
Int64Value: 42,
|
||||
},
|
||||
},
|
||||
@ -71,37 +72,37 @@ func TestMapTable(t *testing.T) {
|
||||
func TestMappingRowValue(t *testing.T) {
|
||||
dpw := NewDatasourcePluginWrapper(log.New("test-logger"), nil)
|
||||
|
||||
boolRowValue, _ := dpw.mapRowValue(&proto.RowValue{Kind: proto.RowValue_TYPE_BOOL, BoolValue: true})
|
||||
boolRowValue, _ := dpw.mapRowValue(&datasource.RowValue{Kind: datasource.RowValue_TYPE_BOOL, BoolValue: true})
|
||||
haveBool, ok := boolRowValue.(bool)
|
||||
if !ok || haveBool != true {
|
||||
t.Fatalf("Expected true, was %s", haveBool)
|
||||
}
|
||||
|
||||
intRowValue, _ := dpw.mapRowValue(&proto.RowValue{Kind: proto.RowValue_TYPE_INT64, Int64Value: 42})
|
||||
intRowValue, _ := dpw.mapRowValue(&datasource.RowValue{Kind: datasource.RowValue_TYPE_INT64, Int64Value: 42})
|
||||
haveInt, ok := intRowValue.(int64)
|
||||
if !ok || haveInt != 42 {
|
||||
t.Fatalf("Expected %d, was %d", 42, haveInt)
|
||||
}
|
||||
|
||||
stringRowValue, _ := dpw.mapRowValue(&proto.RowValue{Kind: proto.RowValue_TYPE_STRING, StringValue: "grafana"})
|
||||
stringRowValue, _ := dpw.mapRowValue(&datasource.RowValue{Kind: datasource.RowValue_TYPE_STRING, StringValue: "grafana"})
|
||||
haveString, ok := stringRowValue.(string)
|
||||
if !ok || haveString != "grafana" {
|
||||
t.Fatalf("Expected %s, was %s", "grafana", haveString)
|
||||
}
|
||||
|
||||
doubleRowValue, _ := dpw.mapRowValue(&proto.RowValue{Kind: proto.RowValue_TYPE_DOUBLE, DoubleValue: 1.5})
|
||||
doubleRowValue, _ := dpw.mapRowValue(&datasource.RowValue{Kind: datasource.RowValue_TYPE_DOUBLE, DoubleValue: 1.5})
|
||||
haveDouble, ok := doubleRowValue.(float64)
|
||||
if !ok || haveDouble != 1.5 {
|
||||
t.Fatalf("Expected %v, was %v", 1.5, haveDouble)
|
||||
}
|
||||
|
||||
bytesRowValue, _ := dpw.mapRowValue(&proto.RowValue{Kind: proto.RowValue_TYPE_BYTES, BytesValue: []byte{66}})
|
||||
bytesRowValue, _ := dpw.mapRowValue(&datasource.RowValue{Kind: datasource.RowValue_TYPE_BYTES, BytesValue: []byte{66}})
|
||||
haveBytes, ok := bytesRowValue.([]byte)
|
||||
if !ok || len(haveBytes) != 1 || haveBytes[0] != 66 {
|
||||
t.Fatalf("Expected %v, was %v", []byte{66}, haveBytes)
|
||||
}
|
||||
|
||||
haveNil, _ := dpw.mapRowValue(&proto.RowValue{Kind: proto.RowValue_TYPE_NULL})
|
||||
haveNil, _ := dpw.mapRowValue(&datasource.RowValue{Kind: datasource.RowValue_TYPE_NULL})
|
||||
if haveNil != nil {
|
||||
t.Fatalf("Expected %v, was %v", nil, haveNil)
|
||||
}
|
@ -14,8 +14,9 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
shared "github.com/grafana/grafana/pkg/plugins/datasource/tsdb"
|
||||
"github.com/grafana/grafana/pkg/plugins/datasource/wrapper"
|
||||
"github.com/grafana/grafana/pkg/tsdb"
|
||||
"github.com/grafana/grafana_plugin_model/go/datasource"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
)
|
||||
|
||||
@ -92,7 +93,7 @@ func (p *DataSourcePlugin) spawnSubProcess() error {
|
||||
|
||||
p.client = plugin.NewClient(&plugin.ClientConfig{
|
||||
HandshakeConfig: handshakeConfig,
|
||||
Plugins: map[string]plugin.Plugin{p.Id: &shared.TsdbPluginImpl{}},
|
||||
Plugins: map[string]plugin.Plugin{p.Id: &datasource.DatasourcePluginImpl{}},
|
||||
Cmd: exec.Command(fullpath),
|
||||
AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC},
|
||||
Logger: LogWrapper{Logger: p.log},
|
||||
@ -108,10 +109,10 @@ func (p *DataSourcePlugin) spawnSubProcess() error {
|
||||
return err
|
||||
}
|
||||
|
||||
plugin := raw.(shared.TsdbPlugin)
|
||||
plugin := raw.(datasource.DatasourcePlugin)
|
||||
|
||||
tsdb.RegisterTsdbQueryEndpoint(p.Id, func(dsInfo *models.DataSource) (tsdb.TsdbQueryEndpoint, error) {
|
||||
return shared.NewDatasourcePluginWrapper(p.log, plugin), nil
|
||||
return wrapper.NewDatasourcePluginWrapper(p.log, plugin), nil
|
||||
})
|
||||
|
||||
return nil
|
||||
|
@ -1,98 +0,0 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "proto";
|
||||
|
||||
package plugins;
|
||||
|
||||
message TsdbQuery {
|
||||
TimeRange timeRange = 1;
|
||||
DatasourceInfo datasource = 2;
|
||||
repeated Query queries = 3;
|
||||
}
|
||||
|
||||
message Query {
|
||||
string refId = 1;
|
||||
int64 maxDataPoints = 2;
|
||||
int64 intervalMs = 3;
|
||||
string modelJson = 4;
|
||||
}
|
||||
|
||||
message TimeRange {
|
||||
string fromRaw = 1;
|
||||
string toRaw = 2;
|
||||
int64 fromEpochMs = 3;
|
||||
int64 toEpochMs = 4;
|
||||
}
|
||||
|
||||
message Response {
|
||||
repeated QueryResult results = 1;
|
||||
}
|
||||
|
||||
message QueryResult {
|
||||
string error = 1;
|
||||
string refId = 2;
|
||||
string metaJson = 3;
|
||||
repeated TimeSeries series = 4;
|
||||
repeated Table tables = 5;
|
||||
}
|
||||
|
||||
message Table {
|
||||
repeated TableColumn columns = 1;
|
||||
repeated TableRow rows = 2;
|
||||
}
|
||||
|
||||
message TableColumn {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message TableRow {
|
||||
repeated RowValue values = 1;
|
||||
}
|
||||
|
||||
message RowValue {
|
||||
enum Kind {
|
||||
// Field type null.
|
||||
TYPE_NULL = 0;
|
||||
// Field type double.
|
||||
TYPE_DOUBLE = 1;
|
||||
// Field type int64.
|
||||
TYPE_INT64 = 2;
|
||||
// Field type bool.
|
||||
TYPE_BOOL = 3;
|
||||
// Field type string.
|
||||
TYPE_STRING = 4;
|
||||
// Field type bytes.
|
||||
TYPE_BYTES = 5;
|
||||
};
|
||||
|
||||
Kind kind = 1;
|
||||
double doubleValue = 2;
|
||||
int64 int64Value = 3;
|
||||
bool boolValue = 4;
|
||||
string stringValue = 5;
|
||||
bytes bytesValue = 6;
|
||||
}
|
||||
|
||||
message DatasourceInfo {
|
||||
int64 id = 1;
|
||||
int64 orgId = 2;
|
||||
string name = 3;
|
||||
string type = 4;
|
||||
string url = 5;
|
||||
string jsonData = 6;
|
||||
string secureJsonData = 7;
|
||||
}
|
||||
|
||||
message TimeSeries {
|
||||
string name = 1;
|
||||
map<string, string> tags = 2;
|
||||
repeated Point points = 3;
|
||||
}
|
||||
|
||||
message Point {
|
||||
int64 timestamp = 1;
|
||||
double value = 2;
|
||||
}
|
||||
|
||||
service TsdbPlugin {
|
||||
rpc Query(TsdbQuery) returns (Response);
|
||||
}
|
201
vendor/github.com/grafana/grafana_plugin_model/LICENSE
generated
vendored
Normal file
201
vendor/github.com/grafana/grafana_plugin_model/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -1,17 +1,17 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: tsdb_plugin.proto
|
||||
// source: datasource.proto
|
||||
|
||||
/*
|
||||
Package proto is a generated protocol buffer package.
|
||||
Package datasource is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
tsdb_plugin.proto
|
||||
datasource.proto
|
||||
|
||||
It has these top-level messages:
|
||||
TsdbQuery
|
||||
DatasourceRequest
|
||||
Query
|
||||
TimeRange
|
||||
Response
|
||||
DatasourceResponse
|
||||
QueryResult
|
||||
Table
|
||||
TableColumn
|
||||
@ -21,9 +21,9 @@ It has these top-level messages:
|
||||
TimeSeries
|
||||
Point
|
||||
*/
|
||||
package proto
|
||||
package datasource
|
||||
|
||||
import proto1 "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
@ -33,7 +33,7 @@ import (
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto1.Marshal
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
@ -41,7 +41,7 @@ var _ = math.Inf
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type RowValue_Kind int32
|
||||
|
||||
@ -78,36 +78,36 @@ var RowValue_Kind_value = map[string]int32{
|
||||
}
|
||||
|
||||
func (x RowValue_Kind) String() string {
|
||||
return proto1.EnumName(RowValue_Kind_name, int32(x))
|
||||
return proto.EnumName(RowValue_Kind_name, int32(x))
|
||||
}
|
||||
func (RowValue_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} }
|
||||
|
||||
type TsdbQuery struct {
|
||||
type DatasourceRequest struct {
|
||||
TimeRange *TimeRange `protobuf:"bytes,1,opt,name=timeRange" json:"timeRange,omitempty"`
|
||||
Datasource *DatasourceInfo `protobuf:"bytes,2,opt,name=datasource" json:"datasource,omitempty"`
|
||||
Queries []*Query `protobuf:"bytes,3,rep,name=queries" json:"queries,omitempty"`
|
||||
}
|
||||
|
||||
func (m *TsdbQuery) Reset() { *m = TsdbQuery{} }
|
||||
func (m *TsdbQuery) String() string { return proto1.CompactTextString(m) }
|
||||
func (*TsdbQuery) ProtoMessage() {}
|
||||
func (*TsdbQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||
func (m *DatasourceRequest) Reset() { *m = DatasourceRequest{} }
|
||||
func (m *DatasourceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DatasourceRequest) ProtoMessage() {}
|
||||
func (*DatasourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||
|
||||
func (m *TsdbQuery) GetTimeRange() *TimeRange {
|
||||
func (m *DatasourceRequest) GetTimeRange() *TimeRange {
|
||||
if m != nil {
|
||||
return m.TimeRange
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TsdbQuery) GetDatasource() *DatasourceInfo {
|
||||
func (m *DatasourceRequest) GetDatasource() *DatasourceInfo {
|
||||
if m != nil {
|
||||
return m.Datasource
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TsdbQuery) GetQueries() []*Query {
|
||||
func (m *DatasourceRequest) GetQueries() []*Query {
|
||||
if m != nil {
|
||||
return m.Queries
|
||||
}
|
||||
@ -122,7 +122,7 @@ type Query struct {
|
||||
}
|
||||
|
||||
func (m *Query) Reset() { *m = Query{} }
|
||||
func (m *Query) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *Query) String() string { return proto.CompactTextString(m) }
|
||||
func (*Query) ProtoMessage() {}
|
||||
func (*Query) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
||||
|
||||
@ -162,7 +162,7 @@ type TimeRange struct {
|
||||
}
|
||||
|
||||
func (m *TimeRange) Reset() { *m = TimeRange{} }
|
||||
func (m *TimeRange) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *TimeRange) String() string { return proto.CompactTextString(m) }
|
||||
func (*TimeRange) ProtoMessage() {}
|
||||
func (*TimeRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
||||
|
||||
@ -194,16 +194,16 @@ func (m *TimeRange) GetToEpochMs() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
type DatasourceResponse struct {
|
||||
Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Response) Reset() { *m = Response{} }
|
||||
func (m *Response) String() string { return proto1.CompactTextString(m) }
|
||||
func (*Response) ProtoMessage() {}
|
||||
func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||||
func (m *DatasourceResponse) Reset() { *m = DatasourceResponse{} }
|
||||
func (m *DatasourceResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DatasourceResponse) ProtoMessage() {}
|
||||
func (*DatasourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||||
|
||||
func (m *Response) GetResults() []*QueryResult {
|
||||
func (m *DatasourceResponse) GetResults() []*QueryResult {
|
||||
if m != nil {
|
||||
return m.Results
|
||||
}
|
||||
@ -219,7 +219,7 @@ type QueryResult struct {
|
||||
}
|
||||
|
||||
func (m *QueryResult) Reset() { *m = QueryResult{} }
|
||||
func (m *QueryResult) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *QueryResult) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryResult) ProtoMessage() {}
|
||||
func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
||||
|
||||
@ -264,7 +264,7 @@ type Table struct {
|
||||
}
|
||||
|
||||
func (m *Table) Reset() { *m = Table{} }
|
||||
func (m *Table) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *Table) String() string { return proto.CompactTextString(m) }
|
||||
func (*Table) ProtoMessage() {}
|
||||
func (*Table) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
|
||||
@ -287,7 +287,7 @@ type TableColumn struct {
|
||||
}
|
||||
|
||||
func (m *TableColumn) Reset() { *m = TableColumn{} }
|
||||
func (m *TableColumn) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *TableColumn) String() string { return proto.CompactTextString(m) }
|
||||
func (*TableColumn) ProtoMessage() {}
|
||||
func (*TableColumn) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
|
||||
@ -303,7 +303,7 @@ type TableRow struct {
|
||||
}
|
||||
|
||||
func (m *TableRow) Reset() { *m = TableRow{} }
|
||||
func (m *TableRow) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *TableRow) String() string { return proto.CompactTextString(m) }
|
||||
func (*TableRow) ProtoMessage() {}
|
||||
func (*TableRow) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
|
||||
@ -315,7 +315,7 @@ func (m *TableRow) GetValues() []*RowValue {
|
||||
}
|
||||
|
||||
type RowValue struct {
|
||||
Kind RowValue_Kind `protobuf:"varint,1,opt,name=kind,enum=plugins.RowValue_Kind" json:"kind,omitempty"`
|
||||
Kind RowValue_Kind `protobuf:"varint,1,opt,name=kind,enum=models.RowValue_Kind" json:"kind,omitempty"`
|
||||
DoubleValue float64 `protobuf:"fixed64,2,opt,name=doubleValue" json:"doubleValue,omitempty"`
|
||||
Int64Value int64 `protobuf:"varint,3,opt,name=int64Value" json:"int64Value,omitempty"`
|
||||
BoolValue bool `protobuf:"varint,4,opt,name=boolValue" json:"boolValue,omitempty"`
|
||||
@ -324,7 +324,7 @@ type RowValue struct {
|
||||
}
|
||||
|
||||
func (m *RowValue) Reset() { *m = RowValue{} }
|
||||
func (m *RowValue) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *RowValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*RowValue) ProtoMessage() {}
|
||||
func (*RowValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
|
||||
@ -381,7 +381,7 @@ type DatasourceInfo struct {
|
||||
}
|
||||
|
||||
func (m *DatasourceInfo) Reset() { *m = DatasourceInfo{} }
|
||||
func (m *DatasourceInfo) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *DatasourceInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*DatasourceInfo) ProtoMessage() {}
|
||||
func (*DatasourceInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
|
||||
@ -441,7 +441,7 @@ type TimeSeries struct {
|
||||
}
|
||||
|
||||
func (m *TimeSeries) Reset() { *m = TimeSeries{} }
|
||||
func (m *TimeSeries) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *TimeSeries) String() string { return proto.CompactTextString(m) }
|
||||
func (*TimeSeries) ProtoMessage() {}
|
||||
func (*TimeSeries) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
||||
|
||||
@ -472,7 +472,7 @@ type Point struct {
|
||||
}
|
||||
|
||||
func (m *Point) Reset() { *m = Point{} }
|
||||
func (m *Point) String() string { return proto1.CompactTextString(m) }
|
||||
func (m *Point) String() string { return proto.CompactTextString(m) }
|
||||
func (*Point) ProtoMessage() {}
|
||||
func (*Point) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
|
||||
|
||||
@ -491,19 +491,19 @@ func (m *Point) GetValue() float64 {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto1.RegisterType((*TsdbQuery)(nil), "plugins.TsdbQuery")
|
||||
proto1.RegisterType((*Query)(nil), "plugins.Query")
|
||||
proto1.RegisterType((*TimeRange)(nil), "plugins.TimeRange")
|
||||
proto1.RegisterType((*Response)(nil), "plugins.Response")
|
||||
proto1.RegisterType((*QueryResult)(nil), "plugins.QueryResult")
|
||||
proto1.RegisterType((*Table)(nil), "plugins.Table")
|
||||
proto1.RegisterType((*TableColumn)(nil), "plugins.TableColumn")
|
||||
proto1.RegisterType((*TableRow)(nil), "plugins.TableRow")
|
||||
proto1.RegisterType((*RowValue)(nil), "plugins.RowValue")
|
||||
proto1.RegisterType((*DatasourceInfo)(nil), "plugins.DatasourceInfo")
|
||||
proto1.RegisterType((*TimeSeries)(nil), "plugins.TimeSeries")
|
||||
proto1.RegisterType((*Point)(nil), "plugins.Point")
|
||||
proto1.RegisterEnum("plugins.RowValue_Kind", RowValue_Kind_name, RowValue_Kind_value)
|
||||
proto.RegisterType((*DatasourceRequest)(nil), "models.DatasourceRequest")
|
||||
proto.RegisterType((*Query)(nil), "models.Query")
|
||||
proto.RegisterType((*TimeRange)(nil), "models.TimeRange")
|
||||
proto.RegisterType((*DatasourceResponse)(nil), "models.DatasourceResponse")
|
||||
proto.RegisterType((*QueryResult)(nil), "models.QueryResult")
|
||||
proto.RegisterType((*Table)(nil), "models.Table")
|
||||
proto.RegisterType((*TableColumn)(nil), "models.TableColumn")
|
||||
proto.RegisterType((*TableRow)(nil), "models.TableRow")
|
||||
proto.RegisterType((*RowValue)(nil), "models.RowValue")
|
||||
proto.RegisterType((*DatasourceInfo)(nil), "models.DatasourceInfo")
|
||||
proto.RegisterType((*TimeSeries)(nil), "models.TimeSeries")
|
||||
proto.RegisterType((*Point)(nil), "models.Point")
|
||||
proto.RegisterEnum("models.RowValue_Kind", RowValue_Kind_name, RowValue_Kind_value)
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -514,123 +514,123 @@ var _ grpc.ClientConn
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// Client API for TsdbPlugin service
|
||||
// Client API for DatasourcePlugin service
|
||||
|
||||
type TsdbPluginClient interface {
|
||||
Query(ctx context.Context, in *TsdbQuery, opts ...grpc.CallOption) (*Response, error)
|
||||
type DatasourcePluginClient interface {
|
||||
Query(ctx context.Context, in *DatasourceRequest, opts ...grpc.CallOption) (*DatasourceResponse, error)
|
||||
}
|
||||
|
||||
type tsdbPluginClient struct {
|
||||
type datasourcePluginClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewTsdbPluginClient(cc *grpc.ClientConn) TsdbPluginClient {
|
||||
return &tsdbPluginClient{cc}
|
||||
func NewDatasourcePluginClient(cc *grpc.ClientConn) DatasourcePluginClient {
|
||||
return &datasourcePluginClient{cc}
|
||||
}
|
||||
|
||||
func (c *tsdbPluginClient) Query(ctx context.Context, in *TsdbQuery, opts ...grpc.CallOption) (*Response, error) {
|
||||
out := new(Response)
|
||||
err := grpc.Invoke(ctx, "/plugins.TsdbPlugin/Query", in, out, c.cc, opts...)
|
||||
func (c *datasourcePluginClient) Query(ctx context.Context, in *DatasourceRequest, opts ...grpc.CallOption) (*DatasourceResponse, error) {
|
||||
out := new(DatasourceResponse)
|
||||
err := grpc.Invoke(ctx, "/models.DatasourcePlugin/Query", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for TsdbPlugin service
|
||||
// Server API for DatasourcePlugin service
|
||||
|
||||
type TsdbPluginServer interface {
|
||||
Query(context.Context, *TsdbQuery) (*Response, error)
|
||||
type DatasourcePluginServer interface {
|
||||
Query(context.Context, *DatasourceRequest) (*DatasourceResponse, error)
|
||||
}
|
||||
|
||||
func RegisterTsdbPluginServer(s *grpc.Server, srv TsdbPluginServer) {
|
||||
s.RegisterService(&_TsdbPlugin_serviceDesc, srv)
|
||||
func RegisterDatasourcePluginServer(s *grpc.Server, srv DatasourcePluginServer) {
|
||||
s.RegisterService(&_DatasourcePlugin_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _TsdbPlugin_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TsdbQuery)
|
||||
func _DatasourcePlugin_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DatasourceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TsdbPluginServer).Query(ctx, in)
|
||||
return srv.(DatasourcePluginServer).Query(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/plugins.TsdbPlugin/Query",
|
||||
FullMethod: "/models.DatasourcePlugin/Query",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TsdbPluginServer).Query(ctx, req.(*TsdbQuery))
|
||||
return srv.(DatasourcePluginServer).Query(ctx, req.(*DatasourceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _TsdbPlugin_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "plugins.TsdbPlugin",
|
||||
HandlerType: (*TsdbPluginServer)(nil),
|
||||
var _DatasourcePlugin_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "models.DatasourcePlugin",
|
||||
HandlerType: (*DatasourcePluginServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Query",
|
||||
Handler: _TsdbPlugin_Query_Handler,
|
||||
Handler: _DatasourcePlugin_Query_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "tsdb_plugin.proto",
|
||||
Metadata: "datasource.proto",
|
||||
}
|
||||
|
||||
func init() { proto1.RegisterFile("tsdb_plugin.proto", fileDescriptor0) }
|
||||
func init() { proto.RegisterFile("datasource.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 811 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x55, 0x5d, 0x8f, 0x1b, 0x35,
|
||||
0x14, 0x65, 0xbe, 0x92, 0xcc, 0x0d, 0x0d, 0xa9, 0xa9, 0x20, 0x5a, 0x01, 0x5a, 0x46, 0x50, 0x05,
|
||||
0x90, 0x22, 0x08, 0xa5, 0x45, 0x85, 0xa7, 0xd0, 0x08, 0xa5, 0x84, 0xdd, 0xc5, 0x3b, 0x45, 0x2a,
|
||||
0x0f, 0x54, 0x93, 0x8c, 0x13, 0x86, 0xce, 0x8c, 0x83, 0xed, 0xd9, 0x10, 0xf1, 0xc4, 0x3f, 0xe1,
|
||||
0x99, 0x67, 0x7e, 0x00, 0x3f, 0xad, 0xf2, 0x1d, 0xcf, 0x47, 0xd2, 0x7d, 0x9a, 0xb9, 0xe7, 0x1c,
|
||||
0x5f, 0x5f, 0x5f, 0x1f, 0xdb, 0x70, 0x57, 0xc9, 0x78, 0xf5, 0x62, 0x97, 0x16, 0xdb, 0x24, 0x9f,
|
||||
0xec, 0x04, 0x57, 0x9c, 0x74, 0xcb, 0x48, 0x06, 0xff, 0x58, 0xe0, 0x87, 0x32, 0x5e, 0xfd, 0x54,
|
||||
0x30, 0x71, 0x20, 0x9f, 0x83, 0xaf, 0x92, 0x8c, 0xd1, 0x28, 0xdf, 0xb2, 0x91, 0x75, 0x6e, 0x8d,
|
||||
0xfb, 0x53, 0x32, 0x31, 0xd2, 0x49, 0x58, 0x31, 0xb4, 0x11, 0x91, 0x47, 0x00, 0x71, 0xa4, 0x22,
|
||||
0xc9, 0x0b, 0xb1, 0x66, 0x23, 0x1b, 0x87, 0xbc, 0x5b, 0x0f, 0x79, 0x52, 0x53,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x2d, 0xc4, 0xa0, 0x69, 0xac,
|
||||
0xdd, 0x6e, 0xec, 0x19, 0xf4, 0x32, 0xa6, 0x22, 0xec, 0x88, 0x83, 0x44, 0x1d, 0x93, 0xcf, 0xa0,
|
||||
0x23, 0xcb, 0xdd, 0x73, 0xb1, 0x8c, 0xb7, 0x8f, 0x6c, 0x72, 0x8d, 0x14, 0x35, 0x12, 0x72, 0x1f,
|
||||
0x3a, 0x2a, 0x5a, 0xa5, 0x4c, 0x8e, 0xbc, 0x93, 0xad, 0x0e, 0x35, 0x4c, 0x0d, 0x1b, 0xfc, 0x0a,
|
||||
0x1e, 0x02, 0x7a, 0x95, 0x6b, 0x9e, 0x16, 0x59, 0xfe, 0xfa, 0x2a, 0x51, 0xf0, 0x1d, 0x92, 0xb4,
|
||||
0x12, 0x91, 0x8f, 0xc1, 0x15, 0x7c, 0xaf, 0x77, 0x5e, 0x8b, 0xef, 0x9e, 0xa4, 0xe7, 0x7b, 0x8a,
|
||||
0x74, 0xf0, 0x21, 0xf4, 0x5b, 0xc3, 0x09, 0x01, 0x37, 0x8f, 0x32, 0x66, 0x5a, 0x81, 0xff, 0xc1,
|
||||
0x57, 0xd0, 0xab, 0x06, 0x91, 0x4f, 0xa0, 0x73, 0x13, 0xa5, 0x05, 0xab, 0x8a, 0x68, 0xf2, 0x52,
|
||||
0xbe, 0xff, 0x59, 0x33, 0xd4, 0x08, 0x82, 0xff, 0x6d, 0xe8, 0x55, 0x20, 0xf9, 0x14, 0xdc, 0x97,
|
||||
0x49, 0x5e, 0xba, 0x74, 0x30, 0x7d, 0xe7, 0xb5, 0x51, 0x93, 0x1f, 0x92, 0x3c, 0xa6, 0xa8, 0xd1,
|
||||
0xde, 0x88, 0x79, 0xb1, 0x4a, 0x19, 0x32, 0xd8, 0x7f, 0x8b, 0xb6, 0x21, 0x63, 0xdc, 0x87, 0x0f,
|
||||
0x4a, 0x41, 0x63, 0x5c, 0x83, 0x68, 0xef, 0xac, 0x38, 0x4f, 0x4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1b, 0x1a, 0xcb, 0xdf, 0xe6, 0x29, 0xf2, 0x05, 0xb8, 0x2a, 0xda,
|
||||
0x56, 0xee, 0x7c, 0xff, 0x96, 0x93, 0x32, 0x09, 0xa3, 0xad, 0x9c, 0xe7, 0x4a, 0x1c, 0x28, 0x4a,
|
||||
0xf5, 0x89, 0xd9, 0x95, 0x97, 0xd9, 0xe9, 0xe5, 0x88, 0xd7, 0x19, 0x35, 0xec, 0xd9, 0x23, 0xf0,
|
||||
0xeb, 0xa1, 0x7a, 0x81, 0x2f, 0xd9, 0xc1, 0x4c, 0xad, 0x7f, 0x75, 0xc3, 0x6e, 0x6a, 0x5f, 0xf9,
|
||||
0xb4, 0x0c, 0x1e, 0xdb, 0x5f, 0x5b, 0xc1, 0x37, 0xe0, 0x61, 0x26, 0xbc, 0x7a, 0x92, 0x8c, 0x49,
|
||||
0x15, 0x65, 0x3b, 0xd3, 0xea, 0x06, 0x38, 0x4e, 0x60, 0x99, 0x04, 0xd3, 0x6f, 0x01, 0xf4, 0x9b,
|
||||
0x71, 0x85, 0x25, 0x91, 0x49, 0x75, 0x3d, 0xb7, 0x9e, 0x8a, 0xea, 0x45, 0x39, 0x6b, 0x9d, 0x19,
|
||||
0x73, 0x85, 0xcd, 0xba, 0xbf, 0x78, 0xf8, 0x08, 0xad, 0x3a, 0xf8, 0xf9, 0xf2, 0x55, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x58, 0xae, 0x00, 0xd6, 0xa0, 0x06, 0x00, 0x00,
|
||||
// 808 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x55, 0x5b, 0x6f, 0xf3, 0x44,
|
||||
0x10, 0xc5, 0x97, 0x5c, 0x3c, 0xf9, 0x1a, 0xdc, 0xe5, 0xa2, 0x10, 0x55, 0x28, 0x58, 0x05, 0x02,
|
||||
0x12, 0x01, 0x85, 0xaa, 0x20, 0x90,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0x79, 0x17, 0x20, 0x88, 0x15, 0x13, 0x8f, 0x7e, 0xf8, 0xbd, 0xce, 0xa8,
|
||||
0x25, 0x15, 0x84, 0x1c, 0x81, 0x83, 0xe9, 0x2f, 0x24, 0x8f, 0x3b, 0x36, 0xc6, 0x2f, 0x01, 0xef,
|
||||
0x0f, 0x70, 0x8a, 0xcb, 0x93, 0x0e, 0x34, 0x56, 0x82, 0x47, 0xd4, 0xdf, 0x66, 0x85, 0xe4, 0xa6,
|
||||
0x2e, 0x50, 0x71, 0x8d, 0x9b, 0x69, 0x81, 0x68, 0x90, 0x1e, 0xb4, 0xb4, 0x60, 0xbc, 0xe1, 0x8b,
|
||||
0x5f, 0x8b, 0xdc, 0x55, 0x48, 0x27, 0x57, 0x3c, 0xe7, 0x6d, 0xe4, 0x4b, 0xc0, 0x3b, 0x03, 0x52,
|
||||
0x7d, 0x27, 0xb9, 0xe1, 0xb1, 0x64, 0xe4, 0x13, 0x68, 0x08, 0x26, 0x93, 0x50, 0xc9, 0x8e, 0x81,
|
||||
0xfd, 0x7b, 0x63, 0xbf, 0x7f, 0xc8, 0xd1, 0x5c, 0xe3, 0xfd, 0x6d, 0x40, 0xab, 0x42, 0xe8, 0x52,
|
||||
0x99, 0x10, 0x5c, 0xe4, 0xbd, 0x44, 0xa3, 0xec, 0xb0, 0x59, 0xed, 0x70, 0x17, 0x9a, 0x11, 0x53,
|
||||
0x3e, 0xb6, 0xc6, 0x42, 0xa2, 0xb0, 0xc9, 0xc7, 0x50, 0x97, 0xe9, 0x2b, 0xda, 0x58, 0x05, 0xa9,
|
||||
0x0e, 0xcb, 0x0d, 0x32, 0x34, 0x53, 0x90, 0xf7, 0xa1, 0xae, 0xfc, 0x79, 0xc8, 0x64, 0xa7, 0xb6,
|
||||
0xff, 0xe2, 0x33, 0x8d, 0xd2, 0x8c, 0xf4, 0x7e, 0x86, 0x1a, 0x02, 0xfa, 0x8a, 0x0b, 0x1e, 0x26,
|
||||
0x51, 0xfc, 0xec, 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
||||
0x0d, 0x35, 0x8c, 0x84, 0xbb, 0x27, 0x88, 0x98, 0x54, 0x7e, 0xb4, 0xc9, 0x1a, 0x5d, 0x02, 0xfb,
|
||||
0x01, 0x8c, 0x2c, 0xc0, 0x90, 0x82, 0x5b, 0xbe, 0xd3, 0x75, 0x98, 0xac, 0x83, 0x98, 0x7c, 0x93,
|
||||
0x6f, 0xe9, 0x77, 0x9e, 0x2f, 0xff, 0xec, 0xe7, 0xd2, 0xed, 0xbe, 0x44, 0xa5, 0xfb, 0x6c, 0xf4,
|
||||
0xea, 0xa7, 0xca, 0xdf, 0x61, 0x5e, 0xc7, 0x7f, 0xd5, 0xe7, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff,
|
||||
0x66, 0x11, 0x2d, 0x5a, 0xbf, 0x06, 0x00, 0x00,
|
||||
}
|
42
vendor/github.com/grafana/grafana_plugin_model/go/datasource/service.go
generated
vendored
Normal file
42
vendor/github.com/grafana/grafana_plugin_model/go/datasource/service.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
package datasource
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type DatasourcePlugin interface {
|
||||
Query(ctx context.Context, req *DatasourceRequest) (*DatasourceResponse, error)
|
||||
}
|
||||
|
||||
type DatasourcePluginImpl struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
Plugin DatasourcePlugin
|
||||
}
|
||||
|
||||
func (p *DatasourcePluginImpl) GRPCServer(s *grpc.Server) error {
|
||||
RegisterDatasourcePluginServer(s, &GRPCServer{p.Plugin})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DatasourcePluginImpl) GRPCClient(c *grpc.ClientConn) (interface{}, error) {
|
||||
return &GRPCClient{NewDatasourcePluginClient(c)}, nil
|
||||
}
|
||||
|
||||
type GRPCClient struct {
|
||||
DatasourcePluginClient
|
||||
}
|
||||
|
||||
func (m *GRPCClient) Query(ctx context.Context, req *DatasourceRequest) (*DatasourceResponse, error) {
|
||||
return m.DatasourcePluginClient.Query(ctx, req)
|
||||
}
|
||||
|
||||
type GRPCServer struct {
|
||||
DatasourcePlugin
|
||||
}
|
||||
|
||||
func (m *GRPCServer) Query(ctx context.Context, req *DatasourceRequest) (*DatasourceResponse, error) {
|
||||
return m.DatasourcePlugin.Query(ctx, req)
|
||||
}
|
10
vendor/vendor.json
vendored
10
vendor/vendor.json
vendored
@ -434,10 +434,6 @@
|
||||
"revision": "e8409d73255791843585964791443dbad877058c",
|
||||
"revisionTime": "2017-03-17T12:25:07Z"
|
||||
},
|
||||
{
|
||||
"path": "github.com/go-xorm/xor,m",
|
||||
"revision": ""
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "xkwhf97yNV6tFwrOHCPeWtKW39E=",
|
||||
"path": "github.com/go-xorm/xorm",
|
||||
@ -486,6 +482,12 @@
|
||||
"revision": "3ab3a8b8831546bd18fd182c20687ca853b2bb13",
|
||||
"revisionTime": "2016-12-15T22:53:35Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "EtBErX/rtSQmC2z8fgl6WFBCt+E=",
|
||||
"path": "github.com/grafana/grafana_plugin_model/go/datasource",
|
||||
"revision": "50b475deb168a09c6b9be2658a230add915e913b",
|
||||
"revisionTime": "2018-01-17T10:10:56Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "0OUXdKhaE6TzpHevY0VFlAA5YJ8=",
|
||||
"path": "github.com/hashicorp/go-hclog",
|
||||
|
Loading…
Reference in New Issue
Block a user