forked from vicanso/pingap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pingap.toml
217 lines (149 loc) · 5 KB
/
pingap.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[basic]
# application name (default pingap)
name = "pingap"
# the error response's template (default <html>...</html>)
error_template = ""
# process id file (default /tmp/pingap.pid)
pid_file = "/tmp/pingap.pid"
# upgrade sock (default /tmp/pingap_upgrade.sock)
upgrade_sock = "/tmp/pingap_upgrade.sock"
# daemon user (default none)
# user = ""
# daemon group (default none)
# group = ""
# thread count of server (default 1)
threads = 1
# enable work stealing runtime (default true)
work_stealing = true
# grace period before starting the final step of the graceful shutdown
# after signaling shutdown (default 5m)
grace_period = "3m"
# timeout of the final step for the graceful shutdown (default 5s)
graceful_shutdown_timeout = "10s"
# log level for application (default none)
log_level = "info"
# log format as json (default false)
log_format_json = false
# sentry connection uri (default none)
sentry = ""
# auto check configuration interval, process will be restartd if changed (default 90s)
auto_restart_check_interval = "1m"
# the file cache directory, cache will use memory if cache directory none (default none)
cache_directory = ""
# the max cache size (default 100mb)
cache_max_size = "100mb"
[upstreams.charts]
# upstream address list
addrs = ["127.0.0.1:5000"]
# service discovery (default none)
discovery = ""
# service discover update frequency (default none)
update_frequency = "1m"
# loadbalancer selection algorithm
algo = "hash:cookie"
# sni for https upstream (default none)
sni = ""
# hether to check if upstream' server cert is valid and validated (default true)
verify_cert = true
# upstream http health check
health_check = "http://charts/ping?connection_timeout=3s&pingap"
# upstream address ipv4 only (default false)
ipv4_only = false
# enable tracer for upsteam (default false)
enable_tracer = false
# set alpn form upstream (default h1)
alpn = "h1"
# connection tiemout (default none)
connection_timeout = "10s"
# total connection timeout, include tls handshake (default none)
total_connection_timeout = "30s"
# read timeout (default none)
read_timeout = "10s"
# idle timeout (default none)
idle_timeout = "2m"
# write timeout (default none)
write_timeout = "10s"
# the time a connection needs to be idle before TCP
# begins sending out keep-alive probes (default none)
tcp_idle = "2m"
# duration between TCP keep-alive probes (default none)
tcp_interval = "1m"
# the maximum number of TCP keep-alive probes to send
# before giving up and killing the connection
tcp_probe_count = 9
# tcp receive buffer size (default none)
tcp_recv_buf = "4kb"
# tcp fast open (default none)
tcp_fast_open = true
[upstreams.diving]
addrs = ["127.0.0.1:5001"]
[locations.lo]
# upstream of location (default none)
upstream = "charts"
# location match path (default none)
path = "/"
# location match host, multiple domain names are separated by commas (default none)
host = ""
# set headers to request (default none)
includes = ["proxySetHeader"]
# add headers to request (default none)
proxy_add_headers = ["name:value"]
# rewrite the request path, e.g. `^/api/ /` replace prefix /api/ to / (default none)
rewrite = ""
# the weigh of location (default none)
weight = 1024
# client max body size limit (default none)
client_max_body_size = "1mb"
# plugin list for location
plugins = ["pingap:requestId", "stats"]
[servers.test]
# server linsten address, multiple addresses are separated by commas (default none)
addr = "0.0.0.0:6188"
# access log format (default none)
access_log = "tiny"
# the locations for server
locations = ["lo"]
# the threads count for server (default 1)
threads = 1
# tls certificate(pem) (default none)
# tls_cert = ""
# tle private key(pem) (default none)
# tls_key = ""
# the list of supported ciphers for protocols before TLSv1.3 (default none)
tls_cipher_list = ""
# the list of supported ciphers for protocols TLSv1.3 (default none)
tls_ciphersuites = ""
# tls min version (default none)
tls_min_version = ""
# tls max version (default none)
tls_max_version = ""
# get domain certificates from let's encrypt (default none)
# lets_encrypt = ""
# the file for save certificate (default none)
certificate_file = ""
# using global certificates (default false)
global_certificates = false
# enable http2 (default false)
enabled_h2 = false
# the time a connection needs to be idle before TCP
# begins sending out keep-alive probes (default none)
tcp_idle = "2m"
# duration between TCP keep-alive probes (default none)
tcp_interval = "1m"
# the maximum number of TCP keep-alive probes to send
# before giving up and killing the connection
tcp_probe_count = 9
# enable TCP fast open and set the backlog size of it (defualt none)
tcp_fast_open = 10
# enable prometheus metrics, it can be a push gateway url or pull metrics path (default none)
prometheus_metrics = ""
[plugins.stats]
value = "/stats"
category = "stats"
[storages.authToken]
category = "secret"
secret = "123123"
value = "PLpKJqvfkjTcYTDpauJf+2JnEayP+bm+0Oe60Jk="
[storages.proxySetHeader]
category = "config"
value = 'proxy_set_headers = ["name:value"]'