2024-07-15 17:15:34 +08:00
|
|
|
|
# toml配置文件
|
|
|
|
|
# Wiki:https://github.com/toml-lang/toml
|
|
|
|
|
ServiceName = "snow"
|
|
|
|
|
Debug = true
|
|
|
|
|
Env = "local" # local-本地 develop-开发 beta-预发布 production-线上
|
|
|
|
|
PrometheusCollectEnable = true
|
|
|
|
|
SkyWalkingOapServer = "127.0.0.1:11800"
|
|
|
|
|
|
|
|
|
|
[Log]
|
|
|
|
|
Handler = "file"
|
|
|
|
|
Dir = "./logs"
|
|
|
|
|
Level = "info"
|
|
|
|
|
|
|
|
|
|
[Db]
|
|
|
|
|
Driver = "mysql"
|
|
|
|
|
|
|
|
|
|
[Db.Option]
|
|
|
|
|
MaxConns = 128
|
|
|
|
|
MaxIdle = 32
|
|
|
|
|
IdleTimeout = 180 # second
|
|
|
|
|
Charset = "utf8mb4"
|
|
|
|
|
ConnectTimeout = 3 # second
|
|
|
|
|
|
|
|
|
|
[Db.Master]
|
2024-07-15 17:38:50 +08:00
|
|
|
|
Host = "mysql8"
|
2024-07-15 17:15:34 +08:00
|
|
|
|
Port = 3306
|
|
|
|
|
User = "root"
|
2024-07-15 17:38:50 +08:00
|
|
|
|
Password = "Lsxd#123@5"
|
2024-07-15 17:15:34 +08:00
|
|
|
|
DBName = "auto_monitor"
|
|
|
|
|
|
|
|
|
|
[[Db.Slaves]] # 支持多个从库
|
|
|
|
|
Host = "127.0.0.1"
|
|
|
|
|
Port = 3306
|
|
|
|
|
User = "root"
|
|
|
|
|
Password = "123456"
|
|
|
|
|
DBName = "test"
|
|
|
|
|
|
|
|
|
|
[Api]
|
|
|
|
|
Host = "0.0.0.0"
|
|
|
|
|
Port = 8999
|
|
|
|
|
|
|
|
|
|
[Cache]
|
|
|
|
|
Driver = "redis"
|
|
|
|
|
|
|
|
|
|
[Redis.Master]
|
2024-07-15 17:38:50 +08:00
|
|
|
|
Host = "redis"
|
2024-07-15 17:15:34 +08:00
|
|
|
|
Port = 6379
|
2024-07-15 17:38:50 +08:00
|
|
|
|
Password = "Qwert123.lsxd"
|
|
|
|
|
DB = 0
|
2024-07-15 17:15:34 +08:00
|
|
|
|
|
|
|
|
|
#[Redis.Option]
|
|
|
|
|
#MaxIdle = 64
|
|
|
|
|
#MaxConns = 256
|
|
|
|
|
#IdleTimeout = 180 # second
|
|
|
|
|
#ConnectTimeout = 1
|
|
|
|
|
#ReadTimeout = 1
|
|
|
|
|
#WriteTimeout = 1
|
|
|
|
|
|
|
|
|
|
[AliMns]
|
|
|
|
|
Url = ""
|
|
|
|
|
AccessKeyId = ""
|
|
|
|
|
AccessKeySecret = ""
|