• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14syntax = "proto3";
15
16package pw.rpc.test1;
17
18message Request {
19  uint32 magic_number = 1;
20}
21
22message Response {
23  enum Result {
24    FAILED = 0;
25    FAILED_MISERABLY = 1;
26    I_DONT_WANT_TO_TALK_ABOUT_IT = 2;
27  }
28
29  Result result = 1;
30  string payload = 2;
31}
32
33service TheTestService {
34  // Unary RPC for testing
35  rpc SomeUnary(Request) returns (Response) {}
36
37  // Server streaming RPC for testing
38  rpc SomeServerStreaming(Request) returns (stream Response) {}
39
40  // Client streaming RPC for testing
41  rpc SomeClientStreaming(stream Request) returns (Response) {}
42
43  // Bidirectional streaming RPC for testing
44  rpc SomeBidiStreaming(stream Request) returns (stream Response) {}
45}
46