将全局设置的TCP相关设置移到“集群设置--网站设置”中

This commit is contained in:
GoEdgeLab
2023-09-18 16:55:30 +08:00
parent aaaff5efcf
commit 60cca022a6
5 changed files with 7 additions and 77 deletions

View File

@@ -74,7 +74,6 @@ type NodeConfig struct {
ParentNodes map[int64][]*ParentNodeConfig `yaml:"parentNodes" json:"parentNodes"` // clusterId => []*ParentNodeConfig
// 全局配置
GlobalConfig *serverconfigs.GlobalConfig `yaml:"globalConfig" json:"globalConfig"` // 全局配置
GlobalServerConfig *serverconfigs.GlobalServerConfig `yaml:"globalServerConfig" json:"globalServerConfig"` // 服务全局配置,用来替代 GlobalConfig
ProductConfig *ProductConfig `yaml:"productConfig" json:"productConfig"`
@@ -263,14 +262,6 @@ func (this *NodeConfig) Init(ctx context.Context) (err error, serverErrors []*Se
}
}
// global config
if this.GlobalConfig != nil {
err = this.GlobalConfig.Init()
if err != nil {
return
}
}
// cache policy
if len(this.HTTPCachePolicies) > 0 {
for _, policy := range this.HTTPCachePolicies {
@@ -774,4 +765,4 @@ func (this *NodeConfig) SecretHash() string {
// HasConnTimeoutSettings 检查是否有连接超时设置
func (this *NodeConfig) HasConnTimeoutSettings() bool {
return this.GlobalServerConfig != nil && (this.GlobalServerConfig.Performance.AutoReadTimeout || this.GlobalServerConfig.Performance.AutoWriteTimeout)
}
}