集群服务设置中增加性能设置

This commit is contained in:
GoEdgeLab
2023-01-01 19:27:09 +08:00
parent be4e7568f4
commit 90a0b13aa3

View File

@@ -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"` // 运行日志配置