add protobuf transport and refactor to support (#24)

This commit is contained in:
Josh Thomas 2024-12-11 20:28:57 -06:00 committed by GitHub
parent b3e0ee7b6e
commit 643a47953e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 406 additions and 74 deletions

29
proto/messages.proto Normal file
View file

@ -0,0 +1,29 @@
syntax = "proto3";
package djls;
// Commands we send to Python
message ToAgent {
oneof command {
HealthCheck health_check = 1;
Shutdown shutdown = 2;
}
}
message HealthCheck {}
message Shutdown {}
// Responses we get back
message FromAgent {
oneof message {
HealthCheckResponse health_check = 1;
Error error = 2;
}
}
message HealthCheckResponse {}
message Error {
string message = 1;
string traceback = 2; // Optional stack trace from Python
}