2025-05-25 20:34:08 +08:00
|
|
|
|
package config
|
|
|
|
|
|
2025-05-28 20:19:11 +08:00
|
|
|
|
// Common中只有Special会动态更新,Special是各类服务自己需要及时更新的配置信息
|
2025-06-09 23:52:18 +08:00
|
|
|
|
type Common struct {
|
2025-06-14 16:40:15 +08:00
|
|
|
|
ServiceType int `json:"service_type"`
|
|
|
|
|
Logger Logger `json:"logger"`
|
|
|
|
|
Etcd Etcd `json:"etcd"`
|
|
|
|
|
Redis Redis `json:"redis"`
|
|
|
|
|
Nats Nats `json:"nats"`
|
|
|
|
|
UserDb Mysql `json:"user_db"`
|
|
|
|
|
LogDb ClickHouse `json:"log_db"`
|
|
|
|
|
GameJson string `json:"game_json"`
|
|
|
|
|
GitCommit string `json:"git_commit"` // 服务当前的hash值
|
|
|
|
|
GitBranch string `json:"git_branch"` // 服务当前的版本分支
|
|
|
|
|
BuildDate string `json:"build_date"` // 服务构建时间,用作version
|
2025-05-25 20:34:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Logger struct {
|
|
|
|
|
Level string `json:"level"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Rabbitmq struct {
|
|
|
|
|
Host string `json:"host"`
|
|
|
|
|
Port string `json:"port"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
VHost string `json:"v_host"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-29 00:17:18 +08:00
|
|
|
|
type Mysql struct {
|
2025-05-25 20:34:08 +08:00
|
|
|
|
Host string `json:"host"`
|
|
|
|
|
Port string `json:"port"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
2025-05-29 00:17:18 +08:00
|
|
|
|
DbName string `json:"db_name"`
|
2025-05-25 20:34:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Redis struct {
|
|
|
|
|
Host string `json:"host"`
|
|
|
|
|
Port string `json:"port"`
|
|
|
|
|
Password string `json:"password"` // fox379@@zyxi
|
|
|
|
|
DBIndex int `json:"db_index"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ClickHouse struct {
|
|
|
|
|
Host string `json:"host"`
|
|
|
|
|
Port string `json:"port"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
DbName string `json:"db_name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Nats struct {
|
|
|
|
|
Address []string `json:"address"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Etcd struct {
|
|
|
|
|
Address []string `json:"address"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
}
|