完善服务器

This commit is contained in:
2025-07-01 00:08:27 +08:00
parent b45eb83fe4
commit 7c2c32a31a
37 changed files with 1307 additions and 160 deletions

View File

@@ -4,9 +4,9 @@ app:
log:
debug: true
level: "debug"
max_size: 100
max_backups: 3
max_age: 7
maxSize: 100
maxBackups: 3
maxAge: 7
db:
etcd:

View File

@@ -13,9 +13,9 @@ type AppConfig struct {
type LogConfig struct {
Debug bool `yaml:"debug"`
MaxSize int `yaml:"max_size"`
MaxBackups int `yaml:"max_backups"`
MaxAge int `yaml:"max_age"`
MaxSize int `yaml:"maxSize"`
MaxBackups int `yaml:"maxBackups"`
MaxAge int `yaml:"maxAge"`
Level string `yaml:"level"`
}
@@ -27,8 +27,9 @@ type DBConfig struct {
type ServeConfig struct {
Grpc *struct {
AddressConfig
TTL int64 `yaml:"ttl"`
Address string `yaml:"address"`
Port int `yaml:"port"`
TTL int64 `yaml:"ttl"`
} `yaml:"grpc"`
Socket *struct {
Web *AddressConfig `yaml:"web"`