package
Version:
v0.0.0-...-c188a41
Opens a new window with list of versions in this module.
Published: Oct 12, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Redis() redis.Cmdable
type DBConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
User string `yaml:"user"`
Password string `yaml:"password"`
DB string `yaml:"db"`
Url string `yaml:"url"`
DDL bool `yaml:"ddl"`
Debug bool `yaml:"debug"`
SlowSqlThreshold int64 `yaml:"slowSqlThreshold"`
TableNamePrefix string `yaml:"tableNamePrefix"`
Pool DBPoolConfig `yaml:"pool" mapstructure:"pool"`
}
type DBPoolConfig struct {
MaxOpenConns int `yaml:"maxOpenConns"`
MaxIdleConns int `yaml:"maxIdleConns"`
ConnMaxLifeTime int64 `yaml:"connMaxLifeTime"`
ConnMaxIdleTime int64 `yaml:"connMaxIdleTime"`
}
type RConfig struct {
Mode string `yaml:"mode"`
Debug bool `yaml:"debug"`
Address []string `yaml:"addr" mapstructure:"addr"`
Password string `yaml:"password"`
MasterName string `yaml:"masterName"`
Pool RPoolConfig `yaml:"pool" mapstructure:"pool"`
}
type RPoolConfig struct {
Size int `yaml:"size"`
MinIdle int `yaml:"minIdleSize"`
MaxAge int64 `yaml:"maxAge"`
PoolTimeout int64 `yaml:"poolTimeout"`
IdleTimeout int64 `yaml:"idleTimeout"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.