mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-08 07:50:27 +08:00
集群服务设置中增加性能设置
This commit is contained in:
@@ -8,6 +8,7 @@ func DefaultGlobalServerConfig() *GlobalServerConfig {
|
||||
config.HTTPAccessLog.EnableResponseHeaders = true
|
||||
config.HTTPAccessLog.EnableCookies = true
|
||||
config.Log.RecordServerError = false
|
||||
config.Performance.AutoWriteTimeout = true
|
||||
return config
|
||||
}
|
||||
|
||||
@@ -28,6 +29,11 @@ type GlobalServerConfig struct {
|
||||
EnableCookies bool `yaml:"enableCookies" json:"enableCookies"` // 记录Cookie
|
||||
} `yaml:"httpAccessLog" json:"httpAccessLog"` // 访问日志配置
|
||||
|
||||
Performance struct {
|
||||
Debug bool `yaml:"debug" json:"debug"` // Debug模式
|
||||
AutoWriteTimeout bool `yaml:"autoWriteTimeout" json:"autoWriteTimeout"` // 是否自动写超时
|
||||
} `yaml:"performance" json:"performance"` // 性能
|
||||
|
||||
Log struct {
|
||||
RecordServerError bool `yaml:"recordServerError" json:"recordServerError"` // 记录服务错误到运行日志
|
||||
} `yaml:"log" json:"log"` // 运行日志配置
|
||||
|
||||
Reference in New Issue
Block a user