mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	集群服务设置中增加性能设置
This commit is contained in:
		@@ -85,6 +85,9 @@ func (this *IndexAction) RunPost(params struct {
 | 
			
		||||
 | 
			
		||||
	LogRecordServerError bool
 | 
			
		||||
 | 
			
		||||
	PerformanceAutoWriteTimeout bool
 | 
			
		||||
	PerformanceDebug            bool
 | 
			
		||||
 | 
			
		||||
	Must *actions.Must
 | 
			
		||||
	CSRF *actionutils.CSRF
 | 
			
		||||
}) {
 | 
			
		||||
@@ -124,17 +127,24 @@ func (this *IndexAction) RunPost(params struct {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 域名
 | 
			
		||||
	config.HTTPAll.AllowMismatchDomains = allowMismatchDomains
 | 
			
		||||
	config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP
 | 
			
		||||
	config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain
 | 
			
		||||
 | 
			
		||||
	// 访问日志
 | 
			
		||||
	config.HTTPAccessLog.EnableRequestHeaders = params.HttpAccessLogEnableRequestHeaders
 | 
			
		||||
	config.HTTPAccessLog.EnableResponseHeaders = params.HttpAccessLogEnableResponseHeaders
 | 
			
		||||
	config.HTTPAccessLog.CommonRequestHeadersOnly = params.HttpAccessLogCommonRequestHeadersOnly
 | 
			
		||||
	config.HTTPAccessLog.EnableCookies = params.HttpAccessLogEnableCookies
 | 
			
		||||
 | 
			
		||||
	// 日志
 | 
			
		||||
	config.Log.RecordServerError = params.LogRecordServerError
 | 
			
		||||
 | 
			
		||||
	// 性能
 | 
			
		||||
	config.Performance.AutoWriteTimeout = params.PerformanceAutoWriteTimeout
 | 
			
		||||
	config.Performance.Debug = params.PerformanceDebug
 | 
			
		||||
 | 
			
		||||
	err = config.Init()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.Fail("配置校验失败:" + err.Error())
 | 
			
		||||
 
 | 
			
		||||
@@ -90,6 +90,24 @@
 | 
			
		||||
            </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
 | 
			
		||||
        <h4>性能</h4>
 | 
			
		||||
        <table class="ui table definition selectable">
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td class="title">自动写数据超时</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <checkbox name="performanceAutoWriteTimeout" v-model="config.performance.autoWriteTimeout"></checkbox>
 | 
			
		||||
                    <p class="comment">向客户端发送数据时自动设置超时时间,如果超时,则自动视为慢连接,并关闭网络连接。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>调试模式</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <checkbox name="performanceDebug" v-model="config.performance.debug"></checkbox>
 | 
			
		||||
                    <p class="comment">开启调试模式后,将在某些信息中包含调试信息。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
 | 
			
		||||
        <submit-btn></submit-btn>
 | 
			
		||||
    </form>
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user