diff options
Diffstat (limited to 'crates/daemon/proto/history.proto')
| -rw-r--r-- | crates/daemon/proto/history.proto | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/crates/daemon/proto/history.proto b/crates/daemon/proto/history.proto index 59c12471..46a41a5e 100644 --- a/crates/daemon/proto/history.proto +++ b/crates/daemon/proto/history.proto @@ -1,8 +1,13 @@ syntax = "proto3"; package history; +service History { + rpc StartHistory(StartHistoryRequest) returns (StartHistoryReply); + rpc EndHistory(EndHistoryRequest) returns (EndHistoryReply); + rpc TailHistory(TailHistoryRequest) returns (stream TailHistoryReply); +} + message StartHistoryRequest { - // If people are still using my software in ~530 years, they can figure out a u128 migration uint64 timestamp = 1; // nanosecond unix epoch string command = 2; string cwd = 3; @@ -11,19 +16,17 @@ message StartHistoryRequest { string author = 6; string intent = 7; } - -message EndHistoryRequest { - string id = 1; - int64 exit = 2; - uint64 duration = 3; -} - message StartHistoryReply { string id = 1; string version = 2; uint32 protocol = 3; } +message EndHistoryRequest { + string id = 1; + int64 exit = 2; + uint64 duration = 3; +} message EndHistoryReply { string id = 1; uint64 idx = 2; @@ -31,22 +34,12 @@ message EndHistoryReply { uint32 protocol = 4; } -message StatusRequest {} - -message StatusReply { - bool healthy = 1; - string version = 2; - uint32 pid = 3; - uint32 protocol = 4; -} - -message ShutdownRequest {} - -message ShutdownReply { - bool accepted = 1; -} message TailHistoryRequest {} +message TailHistoryReply { + HistoryEventKind kind = 1; + HistoryEntry history = 2; +} enum HistoryEventKind { HISTORY_EVENT_KIND_UNSPECIFIED = 0; @@ -66,16 +59,3 @@ message HistoryEntry { int64 exit = 9; int64 duration = 10; } - -message TailHistoryReply { - HistoryEventKind kind = 1; - HistoryEntry history = 2; -} - -service History { - rpc StartHistory(StartHistoryRequest) returns (StartHistoryReply); - rpc EndHistory(EndHistoryRequest) returns (EndHistoryReply); - rpc TailHistory(TailHistoryRequest) returns (stream TailHistoryReply); - rpc Status(StatusRequest) returns (StatusReply); - rpc Shutdown(ShutdownRequest) returns (ShutdownReply); -} |
