github.com/google/cloudprober@v0.11.3/servers/http/proto/config.proto (about) 1 // Copyright 2017-2019 Google Inc. 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 syntax = "proto2"; 16 17 package cloudprober.servers.http; 18 19 option go_package = "github.com/google/cloudprober/servers/http/proto"; 20 21 // Next available tag = 10 22 message ServerConf { 23 optional int32 port = 1 [default = 3141]; 24 25 // tls_cert_file and tls_key_file field should be set for HTTPS. 26 enum ProtocolType { 27 HTTP = 0; 28 HTTPS = 1; 29 } 30 optional ProtocolType protocol = 6 [default = HTTP]; 31 32 // Maximum duration for reading the entire request, including the body. 33 optional int32 read_timeout_ms = 2 [default = 10000]; // default: 10s 34 35 // Maximum duration before timing out writes of the response. 36 optional int32 write_timeout_ms = 3 [default = 10000]; // default: 10s 37 38 // Maximum amount of time to wait for the next request when keep-alives are 39 // enabled. 40 optional int32 idle_timeout_ms = 4 [default = 60000]; // default: 1m 41 42 // Certificate file to use for HTTPS servers. 43 optional string tls_cert_file = 7; 44 45 // Private key file corresponding to the certificate above. 46 optional string tls_key_file = 8; 47 48 // Disable HTTP/2 for HTTPS servers. 49 optional bool disable_http2 = 9; 50 51 message PatternDataHandler { 52 // Response sizes to server, e.g. 1024. 53 required int32 response_size = 1; 54 // Pattern is repeated to build the response, with "response_size mod 55 // pattern_size" filled by '0' bytes. 56 optional string pattern = 2 [default = "cloudprober"]; 57 } 58 // Pattern data handler returns pattern data at the url /data_<size_in_bytes>, 59 // e.g. "/data_2048". 60 repeated PatternDataHandler pattern_data_handler = 5; 61 }