zhangkun83 | 5e60785 | 2015-01-22 12:31:56 -0800 | [diff] [blame] | 1 | // A simple service definition for testing the protoc plugin. |
Eric Anderson | ff2a285 | 2015-02-23 00:38:51 -0800 | [diff] [blame] | 2 | syntax = "proto3"; |
zhangkun83 | 5e60785 | 2015-01-22 12:31:56 -0800 | [diff] [blame] | 3 | |
| 4 | package grpc.testing; |
| 5 | |
nmittler | f831458 | 2015-01-27 10:25:39 -0800 | [diff] [blame] | 6 | option java_package = "io.grpc.testing.integration"; |
zhangkun83 | 5e60785 | 2015-01-22 12:31:56 -0800 | [diff] [blame] | 7 | |
| 8 | message SimpleRequest { |
| 9 | } |
| 10 | |
| 11 | message SimpleResponse { |
| 12 | } |
| 13 | |
| 14 | message StreamingInputCallRequest { |
| 15 | } |
| 16 | |
| 17 | message StreamingInputCallResponse { |
| 18 | } |
| 19 | |
| 20 | message StreamingOutputCallRequest { |
| 21 | } |
| 22 | |
| 23 | message StreamingOutputCallResponse { |
| 24 | } |
| 25 | |
| 26 | service TestService { |
| 27 | // One request followed by one response. |
| 28 | // The server returns the client payload as-is. |
| 29 | rpc UnaryCall(SimpleRequest) returns (SimpleResponse); |
| 30 | |
| 31 | // One request followed by a sequence of responses (streamed download). |
| 32 | // The server returns the payload with client desired type and sizes. |
| 33 | rpc StreamingOutputCall(StreamingOutputCallRequest) |
| 34 | returns (stream StreamingOutputCallResponse); |
| 35 | |
| 36 | // A sequence of requests followed by one response (streamed upload). |
| 37 | // The server returns the aggregated size of client payload as the result. |
| 38 | rpc StreamingInputCall(stream StreamingInputCallRequest) |
| 39 | returns (StreamingInputCallResponse); |
| 40 | |
| 41 | // A sequence of requests with each request served by the server immediately. |
| 42 | // As one request could lead to multiple responses, this interface |
| 43 | // demonstrates the idea of full duplexing. |
| 44 | rpc FullDuplexCall(stream StreamingOutputCallRequest) |
| 45 | returns (stream StreamingOutputCallResponse); |
| 46 | |
| 47 | // A sequence of requests followed by a sequence of responses. |
| 48 | // The server buffers all the client requests and then serves them in order. A |
| 49 | // stream of responses are returned to the client when the server starts with |
| 50 | // first request. |
| 51 | rpc HalfDuplexCall(stream StreamingOutputCallRequest) |
| 52 | returns (stream StreamingOutputCallResponse); |
| 53 | } |