1 // Copyright 2015 The gRPC Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // An integration test service that covers all the method signature permutations 15 // of unary/streaming requests/responses. 16 syntax = "proto3"; 17 18 import "grpc/testing/empty.proto"; 19 import "grpc/testing/messages.proto"; 20 21 package grpc.testing; 22 23 option java_package = "io.grpc.testing.integration"; 24 25 // A simple service to test the various types of RPCs and experiment with 26 // performance with various types of payload. 27 service TestService { 28 // One empty request followed by one empty response. 29 rpc EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty); 30 31 // One request followed by one response. 32 rpc UnaryCall(SimpleRequest) returns (SimpleResponse); 33 34 // One request followed by one response. Response has cache control 35 // headers set such that a caching HTTP proxy (such as GFE) can 36 // satisfy subsequent requests. 37 rpc CacheableUnaryCall(SimpleRequest) returns (SimpleResponse); 38 39 // One request followed by a sequence of responses (streamed download). 40 // The server returns the payload with client desired type and sizes. 41 rpc StreamingOutputCall(StreamingOutputCallRequest) 42 returns (stream StreamingOutputCallResponse); 43 44 // A sequence of requests followed by one response (streamed upload). 45 // The server returns the aggregated size of client payload as the result. 46 rpc StreamingInputCall(stream StreamingInputCallRequest) 47 returns (StreamingInputCallResponse); 48 49 // A sequence of requests with each request served by the server immediately. 50 // As one request could lead to multiple responses, this interface 51 // demonstrates the idea of full duplexing. 52 rpc FullDuplexCall(stream StreamingOutputCallRequest) 53 returns (stream StreamingOutputCallResponse); 54 55 // A sequence of requests followed by a sequence of responses. 56 // The server buffers all the client requests and then serves them in order. A 57 // stream of responses are returned to the client when the server starts with 58 // first request. 59 rpc HalfDuplexCall(stream StreamingOutputCallRequest) 60 returns (stream StreamingOutputCallResponse); 61 62 // The test server will not implement this method. It will be used 63 // to test the behavior when clients call unimplemented methods. 64 rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty); 65 } 66 67 // A simple service NOT implemented at servers so clients can test for 68 // that case. 69 service UnimplementedService { 70 // A call that no server should implement 71 rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty); 72 } 73 74 // A service used to control reconnect server. 75 service ReconnectService { 76 rpc Start(grpc.testing.Empty) returns (grpc.testing.Empty); 77 rpc Stop(grpc.testing.Empty) returns (grpc.testing.ReconnectInfo); 78 } 79