mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Add heartbeat.proto
This commit is contained in:
parent
9d7f14cddb
commit
e70c152494
|
@ -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;
|
|
||||||
}
|
|
27
app/assets/protos/heartbeat.proto
Normal file
27
app/assets/protos/heartbeat.proto
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user