blob: 1df34a5a7cc3549e6096d570963f124efb128135 [file] [log] [blame]
zhangkun835e607852015-01-22 12:31:56 -08001// A simple service definition for testing the protoc plugin.
2syntax = "proto2";
3
4package grpc.testing;
5
6option java_package = "com.google.net.stubby.testing.integration";
7
8message SimpleRequest {
9}
10
11message SimpleResponse {
12}
13
14message StreamingInputCallRequest {
15}
16
17message StreamingInputCallResponse {
18}
19
20message StreamingOutputCallRequest {
21}
22
23message StreamingOutputCallResponse {
24}
25
26service 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}