Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `yaml:"addr" env:"REDIS_ADDR" env-default:"localhost:6379"` MinIdleConns int `yaml:"minIdleConns" env:"REDIS_MIN_IDLE_CONNS" env-default:"200"` PoolSize int `yaml:"poolSize" env:"REDIS_POOL_SIZE" env-default:"200"` PoolTimeout int `yaml:"poolTimeout" env:"REDIS_POOL_TIMEOUT" env-default:"5"` Password string `yaml:"password" env:"REDIS_PASSWORD" env-default:""` DB int `yaml:"db" env:"REDIS_DB" env-default:"0"` }
Config is a redis config.
type RedisEngine ¶
type RedisEngine interface { GetRedisClient() *redis.Client Close() }
RedisEngine is an interface for Redis client.
func NewRedisClient ¶
func NewRedisClient(cfgRedis Config) (RedisEngine, error)
Click to show internal directories.
Click to hide internal directories.