...
1syntax = "proto3";
2package echoserver;
3
4import "google/api/annotations.proto";
5
6message EchoRequest {
7 string message = 1;
8}
9
10message EchoResponse {
11 string message = 1;
12}
13
14message Heartbeat {
15 enum Status {
16 UNKNOWN = 0;
17 OK = 1;
18 }
19 Status status = 1;
20}
21
22message Empty {}
23
24service EchoService {
25 rpc Echo(stream EchoRequest) returns (stream EchoResponse) {
26 option (google.api.http) = {post: "/echo", body: "*"};
27 }
28 rpc Stream(Empty) returns (stream EchoResponse) {
29 option (google.api.http) = {get: "/echo"};
30 }
31 rpc Heartbeats(stream Empty) returns (stream Heartbeat) {
32 option (google.api.http) = {post: "/heartbeats"};
33 }
34}
View as plain text