-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
Copy pathpattern.proto
45 lines (37 loc) · 1020 Bytes
/
pattern.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
syntax = "proto3";
package logproto;
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "pkg/logproto/logproto.proto";
import "pkg/push/push.proto";
option go_package = "github.com/grafana/loki/v3/pkg/logproto";
service Pattern {
rpc Push(PushRequest) returns (PushResponse) {}
rpc Query(QueryPatternsRequest) returns (stream QueryPatternsResponse) {}
}
message QueryPatternsRequest {
string query = 1;
google.protobuf.Timestamp start = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
google.protobuf.Timestamp end = 3 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
int64 step = 4;
}
message QueryPatternsResponse {
repeated PatternSeries series = 1;
}
message PatternSeries {
string pattern = 1;
repeated PatternSample samples = 2;
}
message PatternSample {
int64 timestamp = 1 [
(gogoproto.customtype) = "github.com/prometheus/common/model.Time",
(gogoproto.nullable) = false
];
int64 value = 2;
}