diff --git a/app/assets/protos/WelsonJS.GrpcService.proto b/app/assets/protos/WelsonJS.GrpcService.proto deleted file mode 100644 index b3b542f..0000000 --- a/app/assets/protos/WelsonJS.GrpcService.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "WelsonJS.GrpcService"; - -service MessageController { - rpc SendMessageStream (MessageRequest) returns (stream MessageReply); -} - -message MessageRequest { - string clientId = 1; -} - -message MessageReply { - string message = 1; -} \ No newline at end of file diff --git a/app/assets/protos/heartbeat.proto b/app/assets/protos/heartbeat.proto new file mode 100644 index 0000000..0ec3442 --- /dev/null +++ b/app/assets/protos/heartbeat.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +option csharp_namespace = "WelsonJS.Service"; + +package heartbeat; + +service HeartbeatService { + rpc CheckHeartbeat (stream HeartbeatRequest) returns (stream HeartbeatResponse); + rpc FetchPendingEvents (FetchEventsRequest) returns (stream FetchEventsResponse); +} + +message HeartbeatRequest { + bool is_alive = 1; +} + +message HeartbeatResponse { + bool is_alive = 1; +} + +message FetchEventsRequest { + string client_id = 1; +} + +message FetchEventsResponse { + string event_type = 1; + repeated string args = 2; +}