Documentation ¶
Index ¶
- Constants
- type Config
- type Decorator
- func (r *Decorator) BfMAdd(key string, values ...string) ([]interface{}, error)
- func (r *Decorator) BfMExists(key string, values ...string) ([]interface{}, error)
- func (r *Decorator) Del(key string) error
- func (r *Decorator) DelKeys(key string)
- func (r *Decorator) EitherLock(key string, lockBack bool) (string, int64)
- func (r *Decorator) Get(key string) (string, error)
- func (r *Decorator) GetObj(key string, obj interface{}) error
- func (r *Decorator) GetSet(key string, expire time.Duration, getFormDb func() (string, error)) (string, error)
- func (r *Decorator) GetSetObj(key string, obj interface{}, expire time.Duration, ...) error
- func (r *Decorator) GetSetObjRefKey(key string, obj interface{}, expire time.Duration, ...) error
- func (r *Decorator) HSetExEval(key, field, value string, seconds int32) error
- func (r *Decorator) IncrEx(key string, expire, count int32) (int64, error)
- func (r *Decorator) IncrLimitEx(key string, expire, count, limit int32) (int64, error)
- func (r *Decorator) IncrThanEx(key string, expire, count, than int32) (int64, error)
- func (r *Decorator) Limit(key string, time, count int32) (bool, error)
- func (r *Decorator) Lock(key string, outTime int32) int64
- func (r *Decorator) SAddEx(key, value string, seconds int32) (int64, error)
- func (r *Decorator) Set(key string, value string, expire time.Duration) error
- func (r *Decorator) SetObj(key string, obj interface{}, expire time.Duration) error
- func (r *Decorator) SetObjRefKey(key string, obj interface{}, expire time.Duration) error
- type XAddArgs
Constants ¶
View Source
const (
Nil = redis.Nil
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `yaml:"addr"` Passwd string `yaml:"passwd"` LocalCache bool `yaml:"localCache"` Chanel string `yaml:"chanel"` Size int `yaml:"size"` LocalExpire int `yaml:"localExpire"` RedisLocalExpire int `yaml:"redisLocalExpire"` FailSleep int64 `yaml:"failSleep"` FailWaitCount int64 `yaml:"failWaitCount"` }
type Decorator ¶
func (*Decorator) EitherLock ¶
单向锁
func (*Decorator) GetSetObjRefKey ¶
func (*Decorator) HSetExEval ¶
func (*Decorator) IncrLimitEx ¶
增加count大于Limit
func (*Decorator) IncrThanEx ¶
增加count不能超过than
Click to show internal directories.
Click to hide internal directories.