Documentation ¶
Index ¶
- type Master
- type Redis
- func (r *Redis) Del(key string) bool
- func (r *Redis) Exists(key string) bool
- func (r *Redis) Expire(key string, overtime int64) bool
- func (r *Redis) FlushDB() bool
- func (r *Redis) Get(key string, value interface{}) bool
- func (r *Redis) GetNoFix(key string, value interface{}) bool
- func (r *Redis) GetRequirepass() bool
- func (r *Redis) HDel(key string, field ...string) int
- func (r *Redis) HExists(key string, field string) int
- func (r *Redis) HGet(key string, field string, value interface{}) bool
- func (r *Redis) HGetAll(key string) lib.Row
- func (r *Redis) HKeys(key string) []string
- func (r *Redis) HLen(key string) int
- func (r *Redis) HMset(key string, value lib.InRow) bool
- func (r *Redis) HSet(key string, field string, value interface{}) int
- func (r *Redis) HSetNx(key string, field string, value interface{}) bool
- func (r *Redis) Keys(key string) []string
- func (r *Redis) LPop(key string, value interface{}) bool
- func (r *Redis) LPush(key string, value ...interface{}) int64
- func (r *Redis) Len(key string) int64
- func (r *Redis) Master() Master
- func (r *Redis) Ping() bool
- func (r *Redis) Pop(key string, value interface{}) bool
- func (r *Redis) Push(key string, value interface{}) bool
- func (r *Redis) RPop(key string, value interface{}) bool
- func (r *Redis) RPush(key string, value ...interface{}) int64
- func (r *Redis) SAdd(key string, values ...interface{}) int
- func (r *Redis) SCard(key string) int
- func (r *Redis) SDiff(keys ...string) [][]byte
- func (r *Redis) SDiffStore(destination string, keys ...string) int
- func (r *Redis) SInter(keys ...string) [][]byte
- func (r *Redis) SInterStore(destination string, keys ...string) int
- func (r *Redis) SIsMember(key string, value interface{}) bool
- func (r *Redis) SMembers(key string) [][]byte
- func (r *Redis) SMove(source, destination string, member interface{}) int
- func (r *Redis) SPop(key string, value interface{}) bool
- func (r *Redis) SRandMember(key string, count int) [][]byte
- func (r *Redis) SRem(key string, members ...interface{}) int
- func (r *Redis) Select(index int) bool
- func (r *Redis) Set(key string, value interface{}, overtime int64) bool
- func (r *Redis) SetNoFix(key string, value interface{}, overtime int64) bool
- func (r *Redis) SetNx(key string, value interface{}) bool
- func (r *Redis) SetPool(pooler RedisPooler) Rediser
- func (r *Redis) SetRequirepass(password string) bool
- func (r *Redis) Slave() Master
- func (r *Redis) SlaveByName(name string) Master
- func (r *Redis) Ttl(key string) int64
- func (r *Redis) Type(key string) (string, bool)
- type RedisConnect
- type RedisPool
- type RedisPooler
- type Rediser
- type SlaveDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Master ¶
type Master interface { Set(key string, value interface{}, overtime int64) bool SetNoFix(key string, value interface{}, overtime int64) bool SetNx(key string, value interface{}) bool Get(key string, value interface{}) bool GetNoFix(key string, value interface{}) bool Del(key string) bool Ttl(key string) int64 Expire(key string, overtime int64) bool Len(key string) int64 FlushDB() bool Exists(key string) bool Keys(key string) []string RPush(key string, value ...interface{}) int64 LPush(key string, value ...interface{}) int64 LPop(key string, value interface{}) bool RPop(key string, value interface{}) bool Type(key string) (string, bool) Ping() bool GetRequirepass() bool SetRequirepass(password string) bool Select(index int) bool HMset(key string, value lib.InRow) bool HDel(key string, field ...string) int HExists(key string, field string) int HGet(key string, field string, value interface{}) bool HGetAll(key string) lib.Row HLen(key string) int HKeys(key string) []string HSet(key string, field string, value interface{}) int HSetNx(key string, field string, value interface{}) bool SAdd(key string, values ...interface{}) int SCard(key string) int SDiff(keys ...string) [][]byte SDiffStore(destination string, keys ...string) int SInter(keys ...string) [][]byte SInterStore(destination string, keys ...string) int SIsMember(key string, value interface{}) bool SMembers(key string) [][]byte SMove(source, destination string, member interface{}) int SPop(key string, value interface{}) bool SRandMember(key string, count int) [][]byte SRem(key string, members ...interface{}) int Push(key string, value interface{}) bool Pop(key string, value interface{}) bool }
Master 从接口
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis redis对象
func (*Redis) GetRequirepass ¶
GetRequirepass GetRequirepass操作
func (*Redis) SDiffStore ¶
SDiffStore SDiffStore 命令将给定集合之间的差集存储在指定的集合中
func (*Redis) SInterStore ¶
SInterStore SInterStore 操作
func (*Redis) SRandMember ¶
SRandMember SRandMember 返回集合中一个或多个随机数
func (*Redis) SetRequirepass ¶
SetRequirepass SetRequirepass操作
type RedisConnect ¶
RedisConnect 连接配置
type RedisPool ¶
type RedisPool struct {
// contains filtered or unexported fields
}
RedisPool 连接池
func (*RedisPool) GetSlaveByName ¶
GetSlaveByName 获得从redis通过名称
type RedisPooler ¶
type RedisPooler interface { GetMaster() *redis.Pool GetSlave() *redis.Pool GetSlaveByName(name string) *redis.Pool Init(connect RedisConnect) }
RedisPooler 连接池接口
Click to show internal directories.
Click to hide internal directories.