blob: a76d19930e5d5095de8d6c22cf071c70194c70c2 [file] [log] [blame]
Serge Bazanski3d116b22021-03-27 15:43:18 +00001syntax = "proto3";
2package proto;
3option go_package = "code.hackerspace.pl/hscloud/personal/q3k/shipstuck/proto";
4
5import "google/api/annotations.proto";
6
7service ShipStuck {
8 rpc Status(StatusRequest) returns (StatusResponse) {
9 option (google.api.http) = {
10 get: "/v1/shipstuck/status"
11 };
12 };
13}
14
15message StatusRequest {
16}
17
18message StatusResponse {
19 // Timestamp (nanos from epoch) of last check.
20 int64 last_checked = 1;
21 enum Stuckness {
22 STUCKNESS_INVALID = 0;
23 STUCKNESS_STUCK = 1;
24 STUCKNESS_FREE = 2;
25 STUCKNESS_UNKNOWN = 3;
Serge Bazanskia4ae66b2021-03-29 13:26:37 +000026 STUCKNESS_TOWED = 4;
Serge Bazanski3d116b22021-03-27 15:43:18 +000027 };
28 Stuckness current = 2;
Serge Bazanskia4ae66b2021-03-29 13:26:37 +000029 // If STUCK or TOWED, how many nanoseconds have elapsed since the whoopsie?
Serge Bazanski3d116b22021-03-27 15:43:18 +000030 int64 elapsed = 3;
31}