-
Notifications
You must be signed in to change notification settings - Fork 1
/
tstorage.proto
43 lines (33 loc) · 922 Bytes
/
tstorage.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
43
syntax = "proto3";
option go_package = "github.com/bartmika/tstorage-server";
package proto;
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
service TStorage {
rpc InsertRow (TimeSeriesDatum) returns (google.protobuf.Empty) {}
rpc InsertRows (stream TimeSeriesDatum) returns (google.protobuf.Empty) {}
rpc Select (Filter) returns (stream DataPoint) {}
}
message DataPoint {
double value = 3;
google.protobuf.Timestamp timestamp = 4;
}
message Label {
string name = 1;
string value = 2;
}
message TimeSeriesDatum {
string metric = 1;
repeated Label labels = 2;
double value = 3;
google.protobuf.Timestamp timestamp = 4;
}
message Filter {
string metric = 1;
repeated Label labels = 2;
google.protobuf.Timestamp start = 3;
google.protobuf.Timestamp end = 4;
}
message SelectResponse {
repeated DataPoint points = 1;
}