Versions in this module Expand all Collapse all v0 v0.0.1 Dec 2, 2020 Changes in this version + type Config struct + Addr string + Addresses []string + ClusterSlots func(ctx context.Context) ([]redis.ClusterSlot, error) + DB int + DialTimeout string + Dialer func(ctx context.Context, network, addr string) (net.Conn, error) + IdleCheckFrequency string + IdleTimeout string + Limiter redis.Limiter + MasterName string + MaxConnAge string + MaxRedirects int + MaxRetries int + MaxRetryBackoff string + MinIdleConns int + MinRetryBackoff string + Network string + NewClient func(opt *redis.Options) *redis.Client + OnConnect func(ctx context.Context, cn *redis.Conn) error + Password string + PoolSize int + PoolTimeout string + Randomly bool + ReadOnly bool + ReadTimeout string + RedisType string + RouteByLatency bool + RouteRandomly bool + SentinelPassword string + SlaveOnly bool + TLSConfig *tls.Config + Username string + WriteTimeout string + func (config Config) NewRedis() redis.Cmdable + type DefaultLogger struct + func NewDefaultLogger() *DefaultLogger + func (d DefaultLogger) Error(args ...interface{}) + func (d DefaultLogger) Warn(args ...interface{}) + type ILogger interface + Error func(args ...interface{}) + Warn func(args ...interface{}) + type List struct + func (l *List) LPop(val interface{}) error + func (l *List) LPush(values ...interface{}) + func (l *List) Len() int64 + func (l *List) RPop(val interface{}) error + func (l *List) RPush(values ...interface{}) + type RBinding struct + func NewDefaultRBinding(ctx context.Context, r *Redis) *RBinding + func (r *RBinding) Del(key string) + func (r *RBinding) Get(key string, val interface{}) (err error) + func (r *RBinding) GetSet(key string, val interface{}) (err error) + func (r *RBinding) List(key string) *List + func (r *RBinding) LoadOrStorage(key string, val interface{}, ...) error + func (r *RBinding) MGet(keys ...string) map[string]Value + func (r *RBinding) Set(key string, val interface{}, expiration time.Duration) (err error) + func (r *RBinding) SetNX(key string, val interface{}, expiration time.Duration) (rs bool, err error) + func (r *RBinding) Sets(key string) *Set + type Redis struct + Config Config + func (s *Redis) Instance() redis.Cmdable + func (s *Redis) OnChange(viper *viper.Viper) + func (s *Redis) SetLogger(logger ILogger) + type Set struct + func (set *Set) SAdd(members ...interface{}) + func (set *Set) SCard() int64 + func (set *Set) SDiff(container interface{}, diffKeys ...string) interface{} + func (set *Set) SInter(container interface{}, diffKeys ...string) interface{} + func (set *Set) SMembers(container interface{}) interface{} + func (set *Set) SMove(destination string, member interface{}) error + func (set *Set) SPop(container interface{}, n ...int64) interface{} + func (set *Set) SRem(members ...interface{}) int64 + func (set *Set) SUnion(container interface{}, diffKeys ...string) interface{} + type Value struct + func (v Value) Bool() (val bool, err error) + func (v Value) Decode(val interface{}) error + func (v Value) DecodeValue(val reflect.Value) error + func (v Value) Float32() (val float32, err error) + func (v Value) Float64() (val float64, err error) + func (v Value) Int() (val int, err error) + func (v Value) Int16() (val int16, err error) + func (v Value) Int32() (val int32, err error) + func (v Value) Int64() (val int64, err error) + func (v Value) Int8() (val int8, err error) + func (v Value) String() (val string, err error) + func (v Value) Uint() (val uint, err error) + func (v Value) Uint16() (val uint16, err error) + func (v Value) Uint32() (val uint32, err error) + func (v Value) Uint64() (val uint64, err error) + func (v Value) Uint8() (val uint8, err error)