123456789101112131415161718192021222324 |
- package config
- type Database struct {
- Driver string
- Source string
- Host string
- ConnMaxIdleTime int
- ConnMaxLifeTime int
- MaxIdleConns int
- MaxOpenConns int
- Registers []DBResolverConfig
- }
- type DBResolverConfig struct {
- Sources []string
- Replicas []string
- Policy string
- Tables []string
- }
- var (
- DatabaseConfig = new(Database)
- DatabasesConfig = make(map[string]*Database)
- )
|