Documentation
¶
Index ¶
- Constants
- func ErrorIsNil(err error) bool
- type RedisClient
- func (rc *RedisClient) BitFill(key string, val int8, start int64, length int64) (err error)
- func (rc *RedisClient) BitFindSpaceStep(key string, length int64, val int8, start int64, end int64, step int64) (position int64, err error)
- func (rc *RedisClient) Clone() (*RedisClient, error)
- func (rc *RedisClient) Conf() (addr string, password string, db int)
- func (rc *RedisClient) CtxDefault() context.Context
- func (rc *RedisClient) Del(key ...string) (err error)
- func (rc *RedisClient) DelByPattern(pattern string) (err error)
- func (rc *RedisClient) Get(key string) (value string, err error)
- func (rc *RedisClient) GetDel(key string) (value string, err error)
- func (rc *RedisClient) GetInt(key string) (value int, err error)
- func (rc *RedisClient) GetLocker(key string, duration time.Duration, tries int) (locker *redsync.Mutex)
- func (rc *RedisClient) GetString(key string) (value string, err error)
- func (rc *RedisClient) GookitRedis() *gookitRedis.GoRedis
- func (rc *RedisClient) Lock(key string, duration time.Duration, tries int) error
- func (rc *RedisClient) LockExtend(key string, duration time.Duration) (bool, error)
- func (rc *RedisClient) RedigoConn() (conn redigo.Conn)
- func (rc *RedisClient) RedigoPool() (pool *redigo.Pool)
- func (rc *RedisClient) Set(key string, value interface{}, expirations ...time.Duration) (string, error)
- func (rc *RedisClient) TryLock(key string, duration time.Duration) error
- func (rc *RedisClient) Unlock(key string) (bool, error)
- type RedisGoConn
- func (rgc *RedisGoConn) Close() error
- func (rgc *RedisGoConn) Do(commandName string, args ...interface{}) (reply interface{}, err error)
- func (rgc *RedisGoConn) Err() error
- func (rgc *RedisGoConn) Flush() error
- func (rgc *RedisGoConn) Receive() (reply interface{}, err error)
- func (rgc *RedisGoConn) Send(commandName string, args ...interface{}) error
Constants ¶
View Source
const ErrRedisNil = redis.Nil
View Source
const LockerKeyPrefix = "utilRedisLock_"
Variables ¶
This section is empty.
Functions ¶
func ErrorIsNil ¶
Types ¶
type RedisClient ¶
func NewRedisClient ¶
func (*RedisClient) BitFindSpaceStep ¶
func (*RedisClient) Clone ¶
func (rc *RedisClient) Clone() (*RedisClient, error)
func (*RedisClient) CtxDefault ¶
func (rc *RedisClient) CtxDefault() context.Context
func (*RedisClient) Del ¶
func (rc *RedisClient) Del(key ...string) (err error)
func (*RedisClient) DelByPattern ¶
func (rc *RedisClient) DelByPattern(pattern string) (err error)
func (*RedisClient) GetString ¶
func (rc *RedisClient) GetString(key string) (value string, err error)
func (*RedisClient) GookitRedis ¶
func (rc *RedisClient) GookitRedis() *gookitRedis.GoRedis
func (*RedisClient) LockExtend ¶
func (*RedisClient) RedigoConn ¶
func (rc *RedisClient) RedigoConn() (conn redigo.Conn)
func (*RedisClient) RedigoPool ¶
func (rc *RedisClient) RedigoPool() (pool *redigo.Pool)
type RedisGoConn ¶
type RedisGoConn struct {
// contains filtered or unexported fields
}
func GoRedisToRedisGoConn ¶
func GoRedisToRedisGoConn(client *redis.Client) *RedisGoConn
func (*RedisGoConn) Close ¶
func (rgc *RedisGoConn) Close() error
func (*RedisGoConn) Do ¶
func (rgc *RedisGoConn) Do(commandName string, args ...interface{}) (reply interface{}, err error)
func (*RedisGoConn) Err ¶
func (rgc *RedisGoConn) Err() error
func (*RedisGoConn) Flush ¶
func (rgc *RedisGoConn) Flush() error
func (*RedisGoConn) Receive ¶
func (rgc *RedisGoConn) Receive() (reply interface{}, err error)
func (*RedisGoConn) Send ¶
func (rgc *RedisGoConn) Send(commandName string, args ...interface{}) error
Click to show internal directories.
Click to hide internal directories.