-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.toml
98 lines (78 loc) · 1.74 KB
/
config.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
# 日志记录器
[logger]
# 记录级别,支持以下值,留空则禁用logger
# empty(不显示级别) / debug / info / warn / error
level = "debug"
# 日志文件的路径,如果留空则不写文件
filePath = ""
# 日志文件的权限,例如755|700|600
fileMode = 600
# 日志输出编码,支持json,console
encode = "console"
# 时间格式,支持以下值
# y 年 / m 月 / d 日 / h 时 / i 分 / s 秒 / timestamp unix时间戳
timeFormat = "y-m-d h:i:s"
# 存储器
[storage]
# 名称
name = "etcd"
# 存储器配置json字符串
config = """
{
"endpoints": ["http://127.0.0.1:2379"],
"key_prefix": "/tsing-gateway"
}"""
# 代理配置
[proxy]
# 监听地址,留空表示监听0.0.0.0
ip = ""
# 退出等待超时时间
quitWaitTimeout = "10s"
# 读取超时
readTimeout= "10s"
# 头信息读取超时
readHeaderTimeout = "10s"
# 响应超时
writeTimeout = "10s"
# 空闲超时
idleTimeout = "10s"
# HTTP配置
# 监听端口,如果为0则禁用HTTP
http.port = 80
# HTTPS配置
# 端口号,如果为0则禁用HTTPS
https.port = 0
# 服务端证书文件
https.cert = ""
# 服务端私钥文件
https.key = ""
# 启用HTTPS支持,必须先启用HTTPS
https.http2 = false
# API服务
[api]
# 访问密钥
secret = "123456"
# 监听地址,留空表示监听0.0.0.0
ip = ""
# 退出等待超时时间
quitWaitTimeout = "10s"
# 读取超时
readTimeout = "10s"
# 头信息读取超时
readHeaderTimeout = "10s"
# 响应超时
writeTimeout = "10s"
# 空闲超时
idleTimeout = "10s"
# HTTP配置
# http端口
http.port = 8080
# HTTPS配置
# 端口号,如果为0则禁用HTTPS
https.port = 0
# 服务端证书
https.cert = ""
# 服务端私钥
https.key = ""
# 启用HTTPS支持,必须先启用HTTPS
https.http2 = false