Imported Upstream version 1.21.0
[platform/upstream/grpc.git] / src / proto / grpc / testing / echo_messages.proto
1
2 // Copyright 2015 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 syntax = "proto3";
17
18 package grpc.testing;
19
20 option cc_enable_arenas = true;
21
22 // Message to be echoed back serialized in trailer.
23 message DebugInfo {
24   repeated string stack_entries = 1;
25   string detail = 2;
26 }
27
28 // Error status client expects to see.
29 message ErrorStatus {
30   int32 code = 1;
31   string error_message = 2;
32   string binary_error_details = 3;
33 }
34
35 message RequestParams {
36   bool echo_deadline = 1;
37   int32 client_cancel_after_us = 2;
38   int32 server_cancel_after_us = 3;
39   bool echo_metadata = 4;
40   bool check_auth_context = 5;
41   int32 response_message_length = 6;
42   bool echo_peer = 7;
43   string expected_client_identity = 8; // will force check_auth_context.
44   bool skip_cancelled_check = 9;
45   string expected_transport_security_type = 10;
46   DebugInfo debug_info = 11;
47   bool server_die = 12; // Server should not see a request with this set.
48   string binary_error_details = 13;
49   ErrorStatus expected_error = 14;
50   int32 server_sleep_us = 15; // Amount to sleep when invoking server
51   int32 backend_channel_idx = 16; // which backend to send request to
52   bool echo_metadata_initially = 17;
53 }
54
55 message EchoRequest {
56   string message = 1;
57   RequestParams param = 2;
58 }
59
60 message ResponseParams {
61   int64 request_deadline = 1;
62   string host = 2;
63   string peer = 3;
64 }
65
66 message EchoResponse {
67   string message = 1;
68   ResponseParams param = 2;
69 }