实现修改缓存配置

This commit is contained in:
刘祥超
2020-09-20 16:27:59 +08:00
parent f238078054
commit ffb06e5b74
15 changed files with 802 additions and 191 deletions

View File

@@ -3,9 +3,10 @@ package serverconfigs
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
type HTTPWebConfig struct {
Id int64 `yaml:"id" json:"id"` // ID
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
Locations []*LocationConfig `yaml:"locations" json:"locations"` // 路径规则 TODO
Id int64 `yaml:"id" json:"id"` // ID
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
Locations []*LocationConfig `yaml:"locations" json:"locations"` // 路径规则 TODO
GzipRef *HTTPGzipRef `yaml:"gzipRef" json:"gzipRef"`
Gzip *HTTPGzipConfig `yaml:"gzip" json:"gzip"` // Gzip配置
Charset string `yaml:"charset" json:"charset"` // 字符编码
Shutdown *HTTPShutdownConfig `yaml:"shutdown" json:"shutdown"` // 临时关闭配置
@@ -16,6 +17,7 @@ type HTTPWebConfig struct {
MaxRequestBodySize string `yaml:"maxRequestBodySize" json:"maxRequestBodySize"` // 请求body最大尺寸
RequestHeaders *shared.HTTPHeaderPolicy `yaml:"requestHeaders" json:"requestHeaders"` // 请求Header
ResponseHeaders *shared.HTTPHeaderPolicy `yaml:"responseHeaders" json:"responseHeaders"` // 响应Header`
AccessLog *HTTPAccessLogConfig `yaml:"accessLog" json:"accessLog"` // 访问日志配置
Stat *HTTPStatConfig `yaml:"stat" json:"stat"` // 统计配置
AccessLogRef *HTTPAccessLogRef `yaml:"accessLog" json:"accessLog"` // 访问日志配置
StatRef *HTTPStatRef `yaml:"statRef" json:"statRef"` // 统计配置
CacheRef *HTTPCacheRef `yaml:"cache" json:"cacheRef"`
}