-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoplum.proto
54 lines (45 loc) · 878 Bytes
/
goplum.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
syntax = "proto3";
package api;
option go_package = "github.com/csmith/goplum/api";
enum Status {
INDETERMINATE = 0;
GOOD = 1;
FAILING = 2;
}
message CheckName {
string name = 1;
}
message CheckList {
repeated Check checks = 1;
}
message Check {
string name = 1;
string type = 2;
int64 last_run = 3;
bool settled = 4;
Status state = 5;
bool suspended = 6;
}
message Fact {
string name = 1;
oneof value {
int64 int = 2;
string str = 3;
}
}
message Result {
string check = 1;
int64 time = 2;
Status result = 3;
string detail = 4;
repeated Fact facts = 5;
}
message Empty {
}
service GoPlum {
rpc Results (Empty) returns (stream Result);
rpc GetChecks (Empty) returns (CheckList);
rpc GetCheck (CheckName) returns (Check);
rpc SuspendCheck (CheckName) returns (Check);
rpc ResumeCheck (CheckName) returns (Check);
}