blob: d2a1fd587933614036f0d398beeaa06b5966993c [file] [log] [blame]
Eric Anderson99a6d8d2016-03-22 11:31:36 -07001// A simple service definition for testing the protoc plugin.
2syntax = "proto2";
3
Eric Andersonb22bcdf2016-03-29 14:13:28 -07004package grpc.testing;
Eric Anderson99a6d8d2016-03-22 11:31:36 -07005
Eric Andersonb22bcdf2016-03-29 14:13:28 -07006option java_package = "io.grpc.testing.integration";
Eric Anderson99a6d8d2016-03-22 11:31:36 -07007option optimize_for = LITE_RUNTIME;
8
9message SimpleRequest {
10}
11
12message SimpleResponse {
13}
14
15message StreamingInputCallRequest {
16}
17
18message StreamingInputCallResponse {
19}
20
21message StreamingOutputCallRequest {
22}
23
24message StreamingOutputCallResponse {
25}
26
nmittler7e8b5042016-04-15 12:52:00 -070027// Test service that supports all call types.
Eric Anderson99a6d8d2016-03-22 11:31:36 -070028service TestService {
29 // One request followed by one response.
30 // The server returns the client payload as-is.
31 rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
32
33 // One request followed by a sequence of responses (streamed download).
34 // The server returns the payload with client desired type and sizes.
35 rpc StreamingOutputCall(StreamingOutputCallRequest)
36 returns (stream StreamingOutputCallResponse);
37
38 // A sequence of requests followed by one response (streamed upload).
39 // The server returns the aggregated size of client payload as the result.
40 rpc StreamingInputCall(stream StreamingInputCallRequest)
41 returns (StreamingInputCallResponse);
42
43 // A sequence of requests with each request served by the server immediately.
44 // As one request could lead to multiple responses, this interface
45 // demonstrates the idea of full bidirectionality.
46 rpc FullBidiCall(stream StreamingOutputCallRequest)
47 returns (stream StreamingOutputCallResponse);
48
49 // A sequence of requests followed by a sequence of responses.
50 // The server buffers all the client requests and then serves them in order. A
51 // stream of responses are returned to the client when the server starts with
52 // first request.
53 rpc HalfBidiCall(stream StreamingOutputCallRequest)
54 returns (stream StreamingOutputCallResponse);
55}