xref: /aosp_15_r20/external/grpc-grpc/src/proto/grpc/testing/echo.proto (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1
2// Copyright 2015 gRPC authors.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//     http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16syntax = "proto3";
17
18package grpc.testing;
19
20import "src/proto/grpc/testing/echo_messages.proto";
21import "src/proto/grpc/testing/simple_messages.proto";
22
23service EchoTestService {
24  rpc Echo(EchoRequest) returns (EchoResponse);
25  rpc Echo1(EchoRequest) returns (EchoResponse);
26  rpc Echo2(EchoRequest) returns (EchoResponse);
27  rpc CheckDeadlineUpperBound(SimpleRequest) returns (StringValue);
28  rpc CheckDeadlineSet(SimpleRequest) returns (StringValue);
29  // A service which checks that the initial metadata sent over contains some
30  // expected key value pair
31  rpc CheckClientInitialMetadata(SimpleRequest) returns (SimpleResponse);
32  rpc RequestStream(stream EchoRequest) returns (EchoResponse);
33  rpc ResponseStream(EchoRequest) returns (stream EchoResponse);
34  rpc BidiStream(stream EchoRequest) returns (stream EchoResponse);
35  rpc Unimplemented(EchoRequest) returns (EchoResponse);
36  rpc UnimplementedBidi(stream EchoRequest) returns (stream EchoResponse);
37}
38
39service EchoTest1Service {
40  rpc Echo(EchoRequest) returns (EchoResponse);
41  rpc Echo1(EchoRequest) returns (EchoResponse);
42  rpc Echo2(EchoRequest) returns (EchoResponse);
43  // A service which checks that the initial metadata sent over contains some
44  // expected key value pair
45  rpc CheckClientInitialMetadata(SimpleRequest) returns (SimpleResponse);
46  rpc RequestStream(stream EchoRequest) returns (EchoResponse);
47  rpc ResponseStream(EchoRequest) returns (stream EchoResponse);
48  rpc BidiStream(stream EchoRequest) returns (stream EchoResponse);
49  rpc Unimplemented(EchoRequest) returns (EchoResponse);
50}
51
52service EchoTest2Service {
53  rpc Echo(EchoRequest) returns (EchoResponse);
54  rpc Echo1(EchoRequest) returns (EchoResponse);
55  rpc Echo2(EchoRequest) returns (EchoResponse);
56  // A service which checks that the initial metadata sent over contains some
57  // expected key value pair
58  rpc CheckClientInitialMetadata(SimpleRequest) returns (SimpleResponse);
59  rpc RequestStream(stream EchoRequest) returns (EchoResponse);
60  rpc ResponseStream(EchoRequest) returns (stream EchoResponse);
61  rpc BidiStream(stream EchoRequest) returns (stream EchoResponse);
62  rpc Unimplemented(EchoRequest) returns (EchoResponse);
63}
64
65service UnimplementedEchoService {
66  rpc Unimplemented(EchoRequest) returns (EchoResponse);
67}
68
69// A service without any rpc defined to test coverage.
70service NoRpcService {}
71