mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 10:33:45 +08:00
63 lines
1022 B
Protocol Buffer
63 lines
1022 B
Protocol Buffer
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;
|
|
|
|
//repeat Table tables = x;
|
|
}
|
|
|
|
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);
|
|
}
|