feat: en redis and logs
This commit is contained in:
@@ -4,8 +4,10 @@ import "github.com/zeromicro/go-zero/zrpc"
|
||||
|
||||
type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
Nacos NacosConf
|
||||
Mysql MysqlConf
|
||||
Nacos NacosConf
|
||||
Mysql MysqlConf
|
||||
BizRedis RedisConf
|
||||
AppLog LogConf
|
||||
}
|
||||
|
||||
type NacosConf struct {
|
||||
@@ -30,3 +32,20 @@ type MysqlConf struct {
|
||||
ReadPassword string `json:",optional"`
|
||||
ReadDatabase string `json:",optional"`
|
||||
}
|
||||
|
||||
type RedisConf struct {
|
||||
Host string
|
||||
Port int `json:",default=6379"`
|
||||
Password string `json:",optional"`
|
||||
DB int `json:",optional"`
|
||||
}
|
||||
|
||||
type LogConf struct {
|
||||
Path string `json:",default=logs"`
|
||||
InfoFile string `json:",default=info.log"`
|
||||
ErrorFile string `json:",default=error.log"`
|
||||
FatalFile string `json:",default=fatal.log"`
|
||||
MaxSize int `json:",default=100"`
|
||||
MaxBackups int `json:",default=10"`
|
||||
MaxAge int `json:",default=30"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user