Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(configPath string)
Types ¶
type TAlgoConfig ¶
type TAlgoConfig struct {
Address string
}
type TConfig ¶
type TConfig struct {
ServiceConfig TServiceConfig `toml:"server"`
AlgoConfig TAlgoConfig `toml:"algo"`
DbConfig TDbConfig `toml:"database"`
}
var Config TConfig
type TDbConfig ¶
type TDbConfig struct {
URI string `toml:"uri" opt:"-"`
DB string `toml:"db" opt:"-"`
Connect string `toml:"connect" opt:"connect"`
ReplicaSet string `toml:"replica_set" opt:"replicaSet"`
MaxPoolSize int `toml:"max_pool_size" opt:"maxPoolSize"`
MinPoolSize int `toml:"min_pool_size" opt:"minPoolSize"`
MaxIdleTimeMS int `toml:"max_idle_time" opt:"maxIdleTimeMS"` // ms
SSL bool `toml:"ssl" opt:"ssl"`
SQLAddress string
SQLName string
SQLPassword string
SQLDbName string
RedisAddress string `toml:"RedisAddress"`
}
type TServiceConfig ¶
Click to show internal directories.
Click to hide internal directories.