1// Copyright 2015 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 15// An integration test service that covers all the method signature permutations 16// of unary/streaming requests/responses. 17syntax = "proto3"; 18 19import "google/protobuf/empty.proto"; 20import "messages.proto"; 21 22package grpc.testing; 23 24option objc_class_prefix = "RMT"; 25 26// A simple service to test the various types of RPCs and experiment with 27// performance with various types of payload. 28service TestService { 29 // One empty request followed by one empty response. 30 rpc EmptyCall(google.protobuf.Empty) returns (google.protobuf.Empty); 31 32 // One request followed by one response. 33 rpc UnaryCall(SimpleRequest) returns (SimpleResponse); 34 35 // One request followed by a sequence of responses (streamed download). 36 // The server returns the payload with client desired type and sizes. 37 rpc StreamingOutputCall(StreamingOutputCallRequest) 38 returns (stream StreamingOutputCallResponse); 39 40 // A sequence of requests followed by one response (streamed upload). 41 // The server returns the aggregated size of client payload as the result. 42 rpc StreamingInputCall(stream StreamingInputCallRequest) 43 returns (StreamingInputCallResponse); 44 45 // A sequence of requests with each request served by the server immediately. 46 // As one request could lead to multiple responses, this interface 47 // demonstrates the idea of full duplexing. 48 rpc FullDuplexCall(stream StreamingOutputCallRequest) 49 returns (stream StreamingOutputCallResponse); 50 51 // A sequence of requests followed by a sequence of responses. 52 // The server buffers all the client requests and then serves them in order. A 53 // stream of responses are returned to the client when the server starts with 54 // first request. 55 rpc HalfDuplexCall(stream StreamingOutputCallRequest) 56 returns (stream StreamingOutputCallResponse); 57} 58