优化数据库,日志,命令模块

This commit is contained in:
2026-02-23 18:54:54 +08:00
parent 47a2dfeda1
commit 3a5f5ddd5d
6 changed files with 330 additions and 218 deletions

View File

@@ -36,3 +36,18 @@ func GetTimestamp() string {
const (
NoAvailableNetworkInterfaces = "No available network interfaces"
)
// 定义目录
const (
DefaultBaseDir string = "/etc/sunhpc"
DefaultTmplDir string = DefaultBaseDir + "/tmpl.d"
DefaultLogDir string = "/var/log/sunhpc"
DefaultLogFile string = DefaultLogDir + "/sunhpc.log"
)
// 定义数据库
const (
DefaultDBName string = "sunhpc.db"
DefaultDBPath string = "/var/lib/sunhpc"
DefaultDBArgs string = "_foreign_keys=on&_journal_mode=WAL&_timeout=5000"
)