Versions in this module Expand all Collapse all v1 v1.0.2 Nov 28, 2021 v1.0.1 Nov 28, 2021 Changes in this version + const DefaultGroupName + func ClearConfig() + func RemoveConfig(name ...string) + func SetConfig(config *Config, name ...string) + func SetConfigByMap(m map[string]interface{}, name ...string) error + type Adapter interface + Close func(ctx context.Context) (err error) + Conn func(ctx context.Context) (conn Conn, err error) + type AdapterGoRedis struct + func NewAdapterGoRedis(config *Config) *AdapterGoRedis + func (r *AdapterGoRedis) Close(ctx context.Context) error + func (r *AdapterGoRedis) Conn(ctx context.Context) (Conn, error) + type Config struct + Address string + Db int + DialTimeout time.Duration + IdleTimeout time.Duration + MasterName string + MaxActive int + MaxConnLifetime time.Duration + MaxIdle int + MinIdle int + Pass string + ReadTimeout time.Duration + TLS bool + TLSConfig *tls.Config + TLSSkipVerify bool + WaitTimeout time.Duration + WriteTimeout time.Duration + func ConfigFromMap(m map[string]interface{}) (config *Config, err error) + func GetConfig(name ...string) (config *Config, ok bool) + type Conn interface + Close func(ctx context.Context) (err error) + Do func(ctx context.Context, command string, args ...interface{}) (result *gvar.Var, err error) + Receive func(ctx context.Context) (result *gvar.Var, err error) + type Message struct + Channel string + Pattern string + Payload string + PayloadSlice []string + type Redis struct + func Instance(name ...string) *Redis + func New(config ...*Config) (*Redis, error) + func NewWithAdapter(adapter Adapter) *Redis + func (r *Redis) Close(ctx context.Context) error + func (r *Redis) Conn(ctx context.Context) (*RedisConn, error) + func (r *Redis) Do(ctx context.Context, command string, args ...interface{}) (*gvar.Var, error) + func (r *Redis) GetAdapter() Adapter + func (r *Redis) SetAdapter(adapter Adapter) + type RedisConn struct + func (c *RedisConn) Close(ctx context.Context) error + func (c *RedisConn) Do(ctx context.Context, command string, args ...interface{}) (reply *gvar.Var, err error) + func (c *RedisConn) Receive(ctx context.Context) (*gvar.Var, error) + type Subscription struct + Channel string + Count int + Kind string + func (m *Subscription) String() string