1 // Copyright 2016 gRPC authors.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
15 // Message definitions to be used by integration test service definitions.
21 // The type of payload that should be returned.
23 // Compressable text format.
26 // Uncompressable binary format.
29 // Randomly chosen from all other formats defined in this enum.
33 // Compression algorithms
34 enum CompressionType {
41 // A block of data, to simply increase gRPC message size.
43 // The type of data in body.
45 // Primary contents of payload.
49 // A protobuf representation for grpc status. This is used by test
50 // clients to specify a status that the server should attempt to return.
57 message SimpleRequest {
58 // Desired payload type in the response from the server.
59 // If response_type is RANDOM, server randomly chooses one from other formats.
60 PayloadType response_type = 1;
62 // Desired payload size in the response from the server.
63 // If response_type is COMPRESSABLE, this denotes the size before compression.
64 int32 response_size = 2;
66 // Optional input payload sent along with the request.
69 // Whether SimpleResponse should include username.
70 bool fill_username = 4;
72 // Whether SimpleResponse should include OAuth scope.
73 bool fill_oauth_scope = 5;
75 // Compression algorithm to be used by the server for the response (stream)
76 CompressionType response_compression = 6;
78 // Whether server should return a given status
79 EchoStatus response_status = 7;
82 // Unary response, as configured by the request.
83 message SimpleResponse {
84 // Payload to increase message size.
86 // The user the request came from, for verifying authentication was
87 // successful when the client expected it.
90 string oauth_scope = 3;
93 // Client-streaming request.
94 message StreamingInputCallRequest {
95 // Optional input payload sent along with the request.
98 // Not expecting any payload from the response.
101 // Client-streaming response.
102 message StreamingInputCallResponse {
103 // Aggregated size of payloads received from the client.
104 int32 aggregated_payload_size = 1;
107 // Configuration for a particular response.
108 message ResponseParameters {
109 // Desired payload sizes in responses from the server.
110 // If response_type is COMPRESSABLE, this denotes the size before compression.
113 // Desired interval between consecutive responses in the response stream in
115 int32 interval_us = 2;
118 // Server-streaming request.
119 message StreamingOutputCallRequest {
120 // Desired payload type in the response from the server.
121 // If response_type is RANDOM, the payload from each response in the stream
122 // might be of different types. This is to simulate a mixed type of payload
124 PayloadType response_type = 1;
126 // Configuration for each expected response message.
127 repeated ResponseParameters response_parameters = 2;
129 // Optional input payload sent along with the request.
132 // Compression algorithm to be used by the server for the response (stream)
133 CompressionType response_compression = 6;
135 // Whether server should return a given status
136 EchoStatus response_status = 7;
139 // Server-streaming response, as configured by the request and parameters.
140 message StreamingOutputCallResponse {
141 // Payload to increase response size.
145 // For reconnect interop test only.
146 // Client tells server what reconnection parameters it used.
147 message ReconnectParams {
148 int32 max_reconnect_backoff_ms = 1;
151 // For reconnect interop test only.
152 // Server tells client whether its reconnects are following the spec and the
153 // reconnect backoffs it saw.
154 message ReconnectInfo {
156 repeated int32 backoff_ms = 2;