File: echoserver.proto

package info (click to toggle)
golang-github-tmc-grpc-websocket-proxy 0.0~git20200427.3cfed13-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 140 kB
  • sloc: makefile: 9
file content (34 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
syntax = "proto3";
package echoserver;

import "google/api/annotations.proto";

message EchoRequest {
  string message = 1;
}

message EchoResponse {
  string message = 1;
}

message Heartbeat {
  enum Status {
    UNKNOWN = 0;
    OK = 1;
  }
  Status status = 1;
}

message Empty {}

service EchoService {
  rpc Echo(stream EchoRequest) returns (stream EchoResponse) {
    option (google.api.http) = {post: "/echo", body: "*"};
  }
  rpc Stream(Empty) returns (stream EchoResponse) {
    option (google.api.http) = {get: "/echo"};
  }
  rpc Heartbeats(stream Empty) returns (stream Heartbeat) {
    option (google.api.http) = {post: "/heartbeats"};
  }
}