aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVigen Issahhanjan <vigeni@google.com>2020-11-19 14:03:25 -0800
committerCommit Bot <commit-bot@chromium.org>2020-12-17 23:26:40 +0000
commit7b37b6fff147e76c403d803ea41720ed6989886f (patch)
treec95f84ed731fbd5fbb83356341f89b5f44cd5cfb
parent4a33b7b19905753224349bc09e1b4adef115cb3c (diff)
downloadopenscreen-7b37b6fff147e76c403d803ea41720ed6989886f.tar.gz
Internal change
PiperOrigin-RevId: 343365350 Change-Id: If6d9f95b1407f88100f2a394d3ba2535579e147c Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2597836 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
-rw-r--r--cast/cast_core/api/runtime/runtime_service.proto14
1 files changed, 14 insertions, 0 deletions
diff --git a/cast/cast_core/api/runtime/runtime_service.proto b/cast/cast_core/api/runtime/runtime_service.proto
index 708d741a..5c8c8da3 100644
--- a/cast/cast_core/api/runtime/runtime_service.proto
+++ b/cast/cast_core/api/runtime/runtime_service.proto
@@ -2,6 +2,7 @@ syntax = "proto3";
package cast.runtime;
+import "google/protobuf/duration.proto";
import "cast/cast_core/api/common/service_info.proto";
option optimize_for = LITE_RUNTIME;
@@ -20,6 +21,11 @@ service RuntimeService {
// If both app_id and cast_session_id are omitted, the current, "foreground"
// application is stopped.
rpc StopApplication(StopApplicationRequest) returns (StopApplicationResponse);
+
+ // Requests runtime to send a heartbeat in a stream. The use of server-side
+ // streaming allows Core to know for sure that runtime is still running. In
+ // case of a crash, the gRPC stream will error with UNAVAILABLE error.
+ rpc Heartbeat(HeartbeatRequest) returns (stream HeartbeatResponse);
}
message LaunchApplicationRequest {
@@ -46,3 +52,11 @@ message StopApplicationResponse {
// If stop application was successful, the Cast session ID that was stopped.
string cast_session_id = 2;
}
+
+message HeartbeatRequest {
+ // Period between two heartbeat responses. The Core will wait for double of
+ // this time to avoid network glitches. The minimum value is 5 seconds.
+ google.protobuf.Duration heartbeat_period = 1;
+}
+
+message HeartbeatResponse {}