Versions in this module Expand all Collapse all v1 v1.16.10 Dec 2, 2021 Changes in this version + const DefaultGroupName + const DefaultRedisPort + func ClearConfig() + func RemoveConfig(name ...string) + func SetConfig(config *Config, name ...string) + func SetConfigByStr(str string, name ...string) error + type Config struct + ConnectTimeout time.Duration + Db int + Host string + IdleTimeout time.Duration + MaxActive int + MaxConnLifetime time.Duration + MaxIdle int + Pass string + Port int + TLS bool + TLSSkipVerify bool + func ConfigFromStr(str string) (config *Config, err error) + func GetConfig(name ...string) (config *Config, ok bool) + type Conn struct + func (c *Conn) Ctx(ctx context.Context) *Conn + func (c *Conn) Do(commandName string, args ...interface{}) (reply interface{}, err error) + func (c *Conn) DoVar(commandName string, args ...interface{}) (*gvar.Var, error) + func (c *Conn) DoVarWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (*gvar.Var, error) + func (c *Conn) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) + func (c *Conn) ReceiveVar() (*gvar.Var, error) + func (c *Conn) ReceiveVarWithTimeout(timeout time.Duration) (*gvar.Var, error) + type PoolStats struct + type Redis struct + func Instance(name ...string) *Redis + func New(config *Config) *Redis + func NewFromStr(str string) (*Redis, error) + func (r *Redis) Clone() *Redis + func (r *Redis) Close() error + func (r *Redis) Conn() *Conn + func (r *Redis) Ctx(ctx context.Context) *Redis + func (r *Redis) Do(commandName string, args ...interface{}) (interface{}, error) + func (r *Redis) DoVar(commandName string, args ...interface{}) (*gvar.Var, error) + func (r *Redis) DoVarWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (*gvar.Var, error) + func (r *Redis) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error) + func (r *Redis) GetConn() *Conn + func (r *Redis) SetIdleTimeout(value time.Duration) + func (r *Redis) SetMaxActive(value int) + func (r *Redis) SetMaxConnLifetime(value time.Duration) + func (r *Redis) SetMaxIdle(value int) + func (r *Redis) Stats() *PoolStats