-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.proto
42 lines (31 loc) · 895 Bytes
/
database.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
syntax = "proto3";
package yiwei.proto;
option go_package = "yiwei/proto";
import "proto/entry.proto";
import "proto/label.proto";
import "proto/series.proto";
message DescribeRequest {}
message DescribeResponse {
repeated string names = 1;
repeated SeriesDescriptor descriptors = 2;
}
message AppendRequest {
string series = 1;
float value = 2;
repeated Label labels = 3;
}
message AppendResponse {}
message QueryRequest {
string series = 1;
int64 start = 2;
int64 end = 3;
LabelFilter filter = 4;
}
message Reading { Entry entry = 1; }
message QueryBatchResponse { repeated Reading readings = 1; }
service Database {
rpc Describe(DescribeRequest) returns (DescribeResponse) {};
rpc Append(AppendRequest) returns (AppendResponse) {};
rpc QueryBatch(QueryRequest) returns (QueryBatchResponse) {};
rpc QueryStream(QueryRequest) returns (stream Reading) {};
}