-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathrpc.proto
74 lines (57 loc) · 1.5 KB
/
rpc.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
syntax = "proto3";
package thanos;
import "types.proto";
import "gogoproto/gogo.proto";
option go_package = "storepb";
option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
service Store {
/// Info returns meta information about a store e.g labels that makes that store unique.
rpc Info(InfoRequest) returns (InfoResponse);
rpc Series(SeriesRequest) returns (stream SeriesResponse);
rpc LabelNames(LabelNamesRequest) returns (LabelNamesResponse);
rpc LabelValues(LabelValuesRequest) returns (LabelValuesResponse);
}
message InfoRequest {
}
message InfoResponse {
repeated Label labels = 1 [(gogoproto.nullable) = false];
int64 min_time = 2;
int64 max_time = 3;
}
message SeriesRequest {
int64 min_time = 1;
int64 max_time = 2;
repeated LabelMatcher matchers = 3 [(gogoproto.nullable) = false];
int64 max_resolution_window = 4;
repeated Aggr aggregates = 5;
}
enum Aggr {
RAW = 0;
COUNT = 1;
SUM = 2;
MIN = 3;
MAX = 4;
COUNTER = 5;
}
message SeriesResponse {
oneof result {
Series series = 1;
string warning = 2;
}
}
message LabelNamesRequest {
}
message LabelNamesResponse {
repeated string names = 1;
repeated string warnings = 2;
}
message LabelValuesRequest {
string label = 1;
}
message LabelValuesResponse {
repeated string values = 1;
repeated string warnings = 2;
}