mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-17 22:36:36 +08:00
实现自动清理服务访问日志
This commit is contained in:
12
pkg/systemconfigs/consts.go
Normal file
12
pkg/systemconfigs/consts.go
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package systemconfigs
|
||||||
|
|
||||||
|
type SettingCode = string
|
||||||
|
|
||||||
|
const (
|
||||||
|
SettingCodeServerGlobalConfig SettingCode = "serverGlobalConfig" // 服务相关全局设置
|
||||||
|
SettingCodeNodeMonitor SettingCode = "nodeMonitor" // 监控节点状态
|
||||||
|
SettingCodeClusterHealthCheck SettingCode = "clusterHealthCheck" // 集群健康检查
|
||||||
|
SettingCodeIPListVersion SettingCode = "ipListVersion" // IP名单的版本号
|
||||||
|
SettingCodeAdminSecurityConfig SettingCode = "adminSecurityConfig" // 管理员安全设置
|
||||||
|
SettingCodeDatabaseConfigSetting SettingCode = "databaseConfig" // 数据库相关配置
|
||||||
|
)
|
||||||
10
pkg/systemconfigs/database_config.go
Normal file
10
pkg/systemconfigs/database_config.go
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package systemconfigs
|
||||||
|
|
||||||
|
// 数据库相关配置
|
||||||
|
type DatabaseConfig struct {
|
||||||
|
ServerAccessLog struct {
|
||||||
|
Clean struct {
|
||||||
|
Days int `json:"days"` // 日志保留天数,0表示不限制
|
||||||
|
} `json:"clean"` // 清理相关配置
|
||||||
|
} `json:"serverAccessLog"` // 服务访问日志相关配置
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user