mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-11 01:50:26 +08:00
在集群服务设置中增加服务统计相关选项
This commit is contained in:
@@ -11,6 +11,10 @@ func DefaultGlobalServerConfig() *GlobalServerConfig {
|
|||||||
config.Log.RecordServerError = false
|
config.Log.RecordServerError = false
|
||||||
config.Performance.AutoWriteTimeout = true
|
config.Performance.AutoWriteTimeout = true
|
||||||
config.Performance.AutoReadTimeout = true
|
config.Performance.AutoReadTimeout = true
|
||||||
|
config.Stat.Upload.MaxCities = 20
|
||||||
|
config.Stat.Upload.MaxProviders = 20
|
||||||
|
config.Stat.Upload.MaxSystems = 20
|
||||||
|
config.Stat.Upload.MaxBrowsers = 20
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,7 +26,7 @@ type GlobalServerConfig struct {
|
|||||||
AllowNodeIP bool `yaml:"allowNodeIP" json:"allowNodeIP"` // 允许IP直接访问
|
AllowNodeIP bool `yaml:"allowNodeIP" json:"allowNodeIP"` // 允许IP直接访问
|
||||||
DefaultDomain string `yaml:"defaultDomain" json:"defaultDomain"` // 默认的域名
|
DefaultDomain string `yaml:"defaultDomain" json:"defaultDomain"` // 默认的域名
|
||||||
DomainMismatchAction *DomainMismatchAction `yaml:"domainMismatchAction" json:"domainMismatchAction"` // 不匹配时采取的动作
|
DomainMismatchAction *DomainMismatchAction `yaml:"domainMismatchAction" json:"domainMismatchAction"` // 不匹配时采取的动作
|
||||||
} `yaml:"httpAll" json:"httpAll"`
|
} `yaml:"httpAll" json:"httpAll"` // HTTP统一配置
|
||||||
|
|
||||||
HTTPAccessLog struct {
|
HTTPAccessLog struct {
|
||||||
EnableRequestHeaders bool `yaml:"enableRequestHeaders" json:"enableRequestHeaders"` // 记录请求Header
|
EnableRequestHeaders bool `yaml:"enableRequestHeaders" json:"enableRequestHeaders"` // 记录请求Header
|
||||||
@@ -32,6 +36,15 @@ type GlobalServerConfig struct {
|
|||||||
EnableServerNotFound bool `yaml:"enableServerNotFound" json:"enableServerNotFound"` // 记录服务找不到的日志
|
EnableServerNotFound bool `yaml:"enableServerNotFound" json:"enableServerNotFound"` // 记录服务找不到的日志
|
||||||
} `yaml:"httpAccessLog" json:"httpAccessLog"` // 访问日志配置
|
} `yaml:"httpAccessLog" json:"httpAccessLog"` // 访问日志配置
|
||||||
|
|
||||||
|
Stat struct {
|
||||||
|
Upload struct {
|
||||||
|
MaxCities int16 `yaml:"maxCities" json:"maxCities"` // 最大区域数量
|
||||||
|
MaxProviders int16 `yaml:"maxProviders" json:"maxProviders"` // 最大运营商数量
|
||||||
|
MaxSystems int16 `yaml:"maxSystems" json:"maxSystems"` // 最大操作系统数量
|
||||||
|
MaxBrowsers int16 `yaml:"maxBrowsers" json:"maxBrowsers"` // 最大浏览器数量
|
||||||
|
} `yaml:"upload" json:"upload"` // 上传相关设置
|
||||||
|
} `yaml:"stat" json:"stat"` // 统计相关配置
|
||||||
|
|
||||||
Performance struct {
|
Performance struct {
|
||||||
Debug bool `yaml:"debug" json:"debug"` // Debug模式
|
Debug bool `yaml:"debug" json:"debug"` // Debug模式
|
||||||
AutoWriteTimeout bool `yaml:"autoWriteTimeout" json:"autoWriteTimeout"` // 是否自动写超时
|
AutoWriteTimeout bool `yaml:"autoWriteTimeout" json:"autoWriteTimeout"` // 是否自动写超时
|
||||||
|
|||||||
Reference in New Issue
Block a user