blob: fb2e3e772258b1f8d428f444b14b33db9ffb4ae9 [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
27service TestService {
28 // One request followed by one response.
29 // The server returns the client payload as-is.
30 rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
31
32 // One request followed by a sequence of responses (streamed download).
33 // The server returns the payload with client desired type and sizes.
34 rpc StreamingOutputCall(StreamingOutputCallRequest)
35 returns (stream StreamingOutputCallResponse);
36
37 // A sequence of requests followed by one response (streamed upload).
38 // The server returns the aggregated size of client payload as the result.
39 rpc StreamingInputCall(stream StreamingInputCallRequest)
40 returns (StreamingInputCallResponse);
41
42 // A sequence of requests with each request served by the server immediately.
43 // As one request could lead to multiple responses, this interface
44 // demonstrates the idea of full bidirectionality.
45 rpc FullBidiCall(stream StreamingOutputCallRequest)
46 returns (stream StreamingOutputCallResponse);
47
48 // A sequence of requests followed by a sequence of responses.
49 // The server buffers all the client requests and then serves them in order. A
50 // stream of responses are returned to the client when the server starts with
51 // first request.
52 rpc HalfBidiCall(stream StreamingOutputCallRequest)
53 returns (stream StreamingOutputCallResponse);
54}