-
Notifications
You must be signed in to change notification settings - Fork 12
/
collector.proto
47 lines (39 loc) · 1.05 KB
/
collector.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
syntax = "proto3";
package poplar;
option go_package = "rpc/internal";
import "poplar.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
message CollectorName {
string name = 1;
}
message EventMetrics {
string name = 1;
google.protobuf.Timestamp time = 2;
int64 id = 3;
EventMetricsCounters counters = 4;
EventMetricsTimers timers = 5;
EventMetricsGauges gauges = 6;
}
message EventMetricsCounters {
int64 number = 1;
int64 ops = 2;
int64 size = 3;
int64 errors = 4;
}
message EventMetricsTimers {
google.protobuf.Duration total = 1;
google.protobuf.Duration duration = 2;
}
message EventMetricsGauges {
int64 state = 1;
int64 workers = 2;
bool failed = 3;
}
service PoplarEventCollector {
rpc CreateCollector(CreateOptions) returns (PoplarResponse);
rpc SendEvent(EventMetrics) returns (PoplarResponse);
rpc RegisterStream(CollectorName) returns (PoplarResponse);
rpc StreamEvents(stream EventMetrics) returns (PoplarResponse);
rpc CloseCollector(PoplarID) returns (PoplarResponse);
}