1// Copyright Istio 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 15syntax = "proto3"; 16 17import "google/protobuf/wrappers.proto"; 18 19// Generate with protoc --go_out=. echo.proto -I /work/common-protos/ -I. 20package proto; 21option go_package="../proto"; 22option java_package = "io.istio.test"; 23option java_outer_classname = "Echo"; 24 25service EchoTestService { 26 rpc Echo (EchoRequest) returns (EchoResponse); 27 rpc ForwardEcho (ForwardEchoRequest) returns (ForwardEchoResponse); 28} 29 30message EchoRequest { 31 string message = 1; 32} 33 34message EchoResponse { 35 string message = 1; 36} 37 38message Header { 39 string key = 1; 40 string value = 2; 41} 42 43message ForwardEchoRequest { 44 int32 count = 1; 45 int32 qps = 2; 46 int64 timeout_micros = 3; 47 string url = 4; 48 repeated Header headers = 5; 49 string message = 6; 50 // Method for the request. Valid only for HTTP 51 string method = 9; 52 // If true, requests will be sent using h2c prior knowledge 53 bool http2 = 7; 54 // If true, requests will be sent using http3 55 bool http3 = 15; 56 // If true, requests will not be sent until magic string is received 57 bool serverFirst = 8; 58 // If true, 301 redirects will be followed 59 bool followRedirects = 14; 60 // If non-empty, make the request with the corresponding cert and key. 61 string cert = 10; 62 string key = 11; 63 // If non-empty, verify the server CA 64 string caCert = 12; 65 // If non-empty, make the request with the corresponding cert and key file. 66 string certFile = 16; 67 string keyFile = 17; 68 // If non-empty, verify the server CA with the ca cert file. 69 string caCertFile = 18; 70 // Skip verifying peer's certificate. 71 bool insecureSkipVerify = 19; 72 // List of ALPNs to present. If not set, this will be automatically be set based on the protocol 73 Alpn alpn = 13; 74 // Server name (SNI) to present in TLS connections. If not set, Host will be used for http requests. 75 string serverName = 20; 76 // Expected response determines what string to look for in the response to validate TCP requests succeeded. 77 // If not set, defaults to "StatusCode=200" 78 google.protobuf.StringValue expectedResponse = 21; 79 // If set, a new connection will be made to the server for each individual request. If false, an attempt 80 // will be made to re-use the connection for the life of the forward request. This is automatically 81 // set for DNS, TCP, TLS, and WebSocket protocols. 82 bool newConnectionPerRequest = 22; 83 // If set, each request will force a DNS lookup. Only applies if newConnectionPerRequest is set. 84 bool forceDNSLookup = 23; 85} 86 87message Alpn { 88 repeated string value = 1; 89} 90 91message ForwardEchoResponse { 92 repeated string output = 1; 93} 94