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