Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Pool redis 连接池, 直接从连接池中获取可用连接 Pool *redis.Pool )
Functions ¶
Types ¶
type RedisConfig ¶
type RedisConfig struct { //Addr reids host:port Addr string `toml:"addr"` //DB use db DB string `toml:"db"` // Password auth need Password string `toml:"password"` // MaxActive max active connection MaxActive int `toml:"max_active"` // MaxIdle max idle connection MaxIdle int `toml:"max_idle"` // ConnLifeTime ConnLifeTime int `toml:"conn_life_time"` // IdleTimeout IdleTimeout time.Duration `toml:"idle_timeout"` ConnectTimeout time.Duration `toml:"connect_timeout"` ReadTimeout time.Duration `toml:"read_timeout"` WriteTimeout time.Duration `toml:"write_timeout"` // TLSEnable AWS ElastiCache若开启密码访问 则需要配置为true TLSEnable bool `toml:"tls_enable"` // TLSSkipVerify AWS ElastiCache若开启密码访问 可以选择是否跳过证书验证,默认true TLSSkipVerify bool `toml:"tls_skip_verify"` }
RedisConfig redis 相关配置
Click to show internal directories.
Click to hide internal directories.