Documentation ¶
Index ¶
- Constants
- func GetPool(conf models.RedisConnConf) *redis.Pool
- func IsWriteCmd(commandName string) bool
- type Breaker
- type BreakerOption
- type GroupBreaker
- type HitStatus
- type InternalPool
- type InternalPoolStat
- type PclientConfig
- type ProxyClient
- func (pc *ProxyClient) Append(s *resp.Session, key string, value string) (interface{}, error)
- func (pc *ProxyClient) BitCount(s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) BitPos(s *resp.Session, key []byte, bit, start, end int) (interface{}, error)
- func (pc *ProxyClient) CheckIsBlackKey(key string) bool
- func (pc *ProxyClient) CheckIsWhiteKey(key string) bool
- func (pc *ProxyClient) Decr(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) DecrBy(s *resp.Session, key []byte, value int64) (interface{}, error)
- func (pc *ProxyClient) Del(s *resp.Session, keys ...interface{}) (interface{}, error)
- func (pc *ProxyClient) Discard(s *resp.Session) error
- func (pc *ProxyClient) DoProbeNode()
- func (pc *ProxyClient) EvalCommon(command string, s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) Exec(s *resp.Session) (prepareOk bool, err error)
- func (pc *ProxyClient) Exists(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) Expire(s *resp.Session, key string, duration int64) (interface{}, error)
- func (pc *ProxyClient) ExpireAt(s *resp.Session, expireType string, key []byte, when int64) (interface{}, error)
- func (pc *ProxyClient) FillPconfigs(pconfigs []*models.Pconfig) error
- func (pc *ProxyClient) FillSlot(slot *models.Slot) error
- func (pc *ProxyClient) FillSlots(slots []*models.Slot) error
- func (pc *ProxyClient) GeoAdd(s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) GeoDist(s *resp.Session, args [][]byte) (interface{}, error)
- func (pc *ProxyClient) GeoHash(s *resp.Session, args [][]byte) (interface{}, error)
- func (pc *ProxyClient) GeoPos(s *resp.Session, args [][]byte) (interface{}, error)
- func (pc *ProxyClient) GeoRadius(s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) GeoRadiusByMember(s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) Get(s *resp.Session, key string) (interface{}, error)
- func (pc *ProxyClient) GetAllGroup() map[int]int
- func (pc *ProxyClient) GetBit(s *resp.Session, key []byte, offset int) (interface{}, error)
- func (pc *ProxyClient) GetMasterClients() (map[int]*resp.InternalServerConn, error)
- func (pc *ProxyClient) GetRange(s *resp.Session, key []byte, start, end int) (interface{}, error)
- func (pc *ProxyClient) GetSet(s *resp.Session, key string, value string) (interface{}, error)
- func (pc *ProxyClient) HClear(s *resp.Session, keys ...[]byte) (interface{}, error)
- func (pc *ProxyClient) HDel(s *resp.Session, key []byte, fields ...[]byte) (interface{}, error)
- func (pc *ProxyClient) HExists(s *resp.Session, key []byte, field []byte) (interface{}, error)
- func (pc *ProxyClient) HExpire(s *resp.Session, key []byte, duration int64) (interface{}, error)
- func (pc *ProxyClient) HExpireAt(s *resp.Session, key []byte, when int64) (interface{}, error)
- func (pc *ProxyClient) HGet(s *resp.Session, key []byte, field []byte) (interface{}, error)
- func (pc *ProxyClient) HGetAll(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) HIncrBy(s *resp.Session, key []byte, field []byte, value int64) (interface{}, error)
- func (pc *ProxyClient) HKeyExists(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) HKeys(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) HLen(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) HMGet(s *resp.Session, key []byte, fields ...[]byte) (interface{}, error)
- func (pc *ProxyClient) HMSet(s *resp.Session, key string, fvmap map[string]interface{}) (interface{}, error)
- func (pc *ProxyClient) HPersist(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) HScan(s *resp.Session, key []byte, cursor []byte, pattern string, count int) ([]byte, [][]byte, error)
- func (pc *ProxyClient) HSet(s *resp.Session, key string, field string, val string) (interface{}, error)
- func (pc *ProxyClient) HSetWithRes(s *resp.Session, key []byte, field []byte, val []byte) (interface{}, error)
- func (pc *ProxyClient) HTtl(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) HVals(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) Incr(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) IncrBy(s *resp.Session, key []byte, value int64) (interface{}, error)
- func (pc *ProxyClient) IncrByFloat(s *resp.Session, key []byte, value interface{}) (interface{}, error)
- func (pc *ProxyClient) KDel(s *resp.Session, keys ...string) (interface{}, error)
- func (pc *ProxyClient) KExists(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) KExpire(s *resp.Session, key string, duration int64) (interface{}, error)
- func (pc *ProxyClient) KExpireAt(s *resp.Session, key []byte, when int64) (interface{}, error)
- func (pc *ProxyClient) KPersist(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) KTtl(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) LClear(s *resp.Session, keys ...[]byte) (interface{}, error)
- func (pc *ProxyClient) LExpire(s *resp.Session, key []byte, duration int64) (interface{}, error)
- func (pc *ProxyClient) LExpireAt(s *resp.Session, key []byte, when int64) (interface{}, error)
- func (pc *ProxyClient) LIndex(s *resp.Session, key []byte, index int) (interface{}, error)
- func (pc *ProxyClient) LInsert(s *resp.Session, key []byte, before string, pivot string, value string) (interface{}, error)
- func (pc *ProxyClient) LKeyExists(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) LLen(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) LPersist(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) LPop(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) LPush(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) LPushX(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) LRange(s *resp.Session, key []byte, start int, stop int) (interface{}, error)
- func (pc *ProxyClient) LRem(s *resp.Session, key []byte, count int, value interface{}) (interface{}, error)
- func (pc *ProxyClient) LSet(s *resp.Session, key []byte, index int, value interface{}) (interface{}, error)
- func (pc *ProxyClient) LTrim(s *resp.Session, key []byte, start int, stop int) (interface{}, error)
- func (pc *ProxyClient) LTrimBack(s *resp.Session, key []byte, size int64) (interface{}, error)
- func (pc *ProxyClient) LTrimFront(s *resp.Session, key []byte, size int64) (interface{}, error)
- func (pc *ProxyClient) LTtl(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) MGet(s *resp.Session, keys [][]byte) (interface{}, error)
- func (pc *ProxyClient) MSet(s *resp.Session, values ...string) (interface{}, error)
- func (pc *ProxyClient) Multi(s *resp.Session) error
- func (pc *ProxyClient) PExpire(s *resp.Session, key string, duration int64) (interface{}, error)
- func (pc *ProxyClient) Pconfigs() []*models.Pconfig
- func (pc *ProxyClient) Persist(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) RPop(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) RPush(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) RPushX(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) SAdd(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) SCard(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) SClear(s *resp.Session, keys ...[]byte) (interface{}, error)
- func (pc *ProxyClient) SExpire(s *resp.Session, key []byte, duration int64) (interface{}, error)
- func (pc *ProxyClient) SExpireAt(s *resp.Session, key []byte, when int64) (interface{}, error)
- func (pc *ProxyClient) SIsMember(s *resp.Session, key []byte, member []byte) (interface{}, error)
- func (pc *ProxyClient) SKeyExists(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) SMembers(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) SPersist(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) SPop(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) SPopByCount(s *resp.Session, key []byte, count int64) (interface{}, error)
- func (pc *ProxyClient) SRandMemberCommandWithCount(s *resp.Session, key []byte, count int) (interface{}, error)
- func (pc *ProxyClient) SRandMemberCommandWithoutCount(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) SRem(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) SScan(s *resp.Session, key string, cursor []byte, pattern string, count int) ([]byte, [][]byte, error)
- func (pc *ProxyClient) STtl(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) ScriptExists(command string, s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) ScriptFlush(s *resp.Session) (interface{}, error)
- func (pc *ProxyClient) ScriptLen(s *resp.Session) (interface{}, error)
- func (pc *ProxyClient) ScriptLoad(s *resp.Session, script string) (interface{}, error)
- func (pc *ProxyClient) Set(s *resp.Session, key string, value string, exType resp.ExpireType, ...) (interface{}, error)
- func (pc *ProxyClient) SetBit(s *resp.Session, key []byte, offset, value int) (interface{}, error)
- func (pc *ProxyClient) SetNx(s *resp.Session, key []byte, value []byte) (interface{}, error)
- func (pc *ProxyClient) SetNxByEX(s *resp.Session, key []byte, value []byte, expire uint64) (interface{}, error)
- func (pc *ProxyClient) SetNxByPX(s *resp.Session, key []byte, value []byte, expire uint64) (interface{}, error)
- func (pc *ProxyClient) SetRange(s *resp.Session, key string, offset int, value string) (interface{}, error)
- func (pc *ProxyClient) Slots() []*models.Slot
- func (pc *ProxyClient) StrLen(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) TTL(ttlType string, s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) Type(key []byte, s *resp.Session) (interface{}, error)
- func (pc *ProxyClient) Unwatch(s *resp.Session) error
- func (pc *ProxyClient) Watch(s *resp.Session, args [][]byte) error
- func (pc *ProxyClient) ZAdd(s *resp.Session, key string, maps map[string]float64) (interface{}, error)
- func (pc *ProxyClient) ZCard(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) ZClear(s *resp.Session, keys ...[]byte) (interface{}, error)
- func (pc *ProxyClient) ZCount(s *resp.Session, key, min, max string) (interface{}, error)
- func (pc *ProxyClient) ZExpire(s *resp.Session, key []byte, duration int64) (interface{}, error)
- func (pc *ProxyClient) ZExpireAt(s *resp.Session, key []byte, when int64) (interface{}, error)
- func (pc *ProxyClient) ZIncrBy(s *resp.Session, key []byte, delta float64, member []byte) (interface{}, error)
- func (pc *ProxyClient) ZKeyExists(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) ZLexCount(s *resp.Session, key, min, max string) (interface{}, error)
- func (pc *ProxyClient) ZPersist(s *resp.Session, key []byte) (interface{}, error)
- func (pc *ProxyClient) ZRange(s *resp.Session, key string, start int, stop int, withscores bool) (interface{}, error)
- func (pc *ProxyClient) ZRangeByLex(s *resp.Session, args ...interface{}) (interface{}, error)
- func (pc *ProxyClient) ZRangeByScore(s *resp.Session, key, min, max string, withscores, limit bool, offset int, ...) (interface{}, error)
- func (pc *ProxyClient) ZRank(s *resp.Session, key []byte, member []byte) (interface{}, error)
- func (pc *ProxyClient) ZRem(s *resp.Session, key []byte, members ...[]byte) (interface{}, error)
- func (pc *ProxyClient) ZRemRangeByLex(s *resp.Session, key, min, max string) (interface{}, error)
- func (pc *ProxyClient) ZRemRangeByRank(s *resp.Session, key string, start int, stop int) (interface{}, error)
- func (pc *ProxyClient) ZRemRangeByScore(s *resp.Session, key, min, max string) (interface{}, error)
- func (pc *ProxyClient) ZRevRange(s *resp.Session, key string, start int, stop int, withscores bool) (interface{}, error)
- func (pc *ProxyClient) ZRevRangeByScore(s *resp.Session, key, max, min string, withscores, limit bool, offset int, ...) (interface{}, error)
- func (pc *ProxyClient) ZRevRank(s *resp.Session, key []byte, member []byte) (interface{}, error)
- func (pc *ProxyClient) ZScan(s *resp.Session, key string, cursor []byte, pattern string, count int) ([]byte, [][]byte, error)
- func (pc *ProxyClient) ZScore(s *resp.Session, key []byte, member []byte) (interface{}, error)
- func (pc *ProxyClient) ZTtl(s *resp.Session, key []byte) (interface{}, error)
- type Router
- func (r *Router) Close()
- func (r *Router) FillSlot(m *models.Slot) error
- func (r *Router) FlushGlobalStat()
- func (r *Router) GetAddrPool(addr string) (*InternalPool, bool)
- func (r *Router) GetAnotherConnByCircuit(slotId int, command string, prevIndex uint64, prevCloud string) (*InternalPool, uint64, error)
- func (r *Router) GetAntsPool(addr string) (*ants.PoolWithFunc, bool)
- func (r *Router) GetConn(slotId int, command string) (interPool *InternalPool, needCircuit bool, curindex uint64, cloudType string, ...)
- func (r *Router) GetGroupId(slotId int) (int, error)
- func (r *Router) GetMasterConn(slotId int) (interPool *InternalPool, err error)
- func (r *Router) GetSlot(id int) *models.Slot
- func (r *Router) GetSlots() []*models.Slot
- func (r *Router) Hash(key interface{}) int
- func (r *Router) HashForLua(key string) int
- func (r *Router) PoolStats() InternalPoolStat
Constants ¶
View Source
const ( MaxSlotNum = models.MaxSlotNum AntsPoolSize = 96 )
View Source
const ( CloudTypeLocal = "local" CloudTypeBackup = "backup" )
View Source
const ( MgetCommandType = iota + 1 MsetCommandType DelCommandType WatchCommandType UnwatchCommandType MultiCommandType PrepareCommandType ExecCommandType DiscardCommandType )
View Source
const (
DefaultLocalCacheExpireTime = 120 * time.Second
)
View Source
const MinBreakerOpenRequest uint32 = 10
Variables ¶
This section is empty.
Functions ¶
func IsWriteCmd ¶
Types ¶
type Breaker ¶
type Breaker struct {
// contains filtered or unexported fields
}
func NewCircuitBreaker ¶
func NewCircuitBreaker(opt *BreakerOption) *Breaker
func (*Breaker) AddBreakerByAddrs ¶
func (*Breaker) GetCircuitBreaker ¶
func (b *Breaker) GetCircuitBreaker(hystrixName string) *gobreaker.CircuitBreaker
func (*Breaker) RemoveCircuitBreakerByAddr ¶
type BreakerOption ¶
type GroupBreaker ¶
type GroupBreaker struct {
// contains filtered or unexported fields
}
func NewGroupBreaker ¶
func NewGroupBreaker(conf *config.Config) *GroupBreaker
func (*GroupBreaker) AddCircuitBreaker ¶
func (gb *GroupBreaker) AddCircuitBreaker(gid int, addrs ...string)
func (*GroupBreaker) GetCircuitBreakerByGid ¶
func (gb *GroupBreaker) GetCircuitBreakerByGid(gid int) (*Breaker, error)
func (*GroupBreaker) RemoveCircuitBreaker ¶
func (gb *GroupBreaker) RemoveCircuitBreaker(gid int, addr string)
type InternalPool ¶
func (*InternalPool) GetConn ¶
func (p *InternalPool) GetConn() redis.Conn
func (*InternalPool) GetHostPort ¶
func (p *InternalPool) GetHostPort() string
func (*InternalPool) PoolClose ¶
func (p *InternalPool) PoolClose()
func (*InternalPool) Stats ¶
func (p *InternalPool) Stats() InternalPoolStat
type InternalPoolStat ¶
type PclientConfig ¶
type PclientConfig struct {
// contains filtered or unexported fields
}
type ProxyClient ¶
type ProxyClient struct {
// contains filtered or unexported fields
}
func GetProxyClient ¶
func GetProxyClient() (*ProxyClient, error)
func NewProxyClient ¶
func NewProxyClient(cfg *config.Config) *ProxyClient
func (*ProxyClient) BitCount ¶
func (pc *ProxyClient) BitCount(s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) CheckIsBlackKey ¶
func (pc *ProxyClient) CheckIsBlackKey(key string) bool
func (*ProxyClient) CheckIsWhiteKey ¶
func (pc *ProxyClient) CheckIsWhiteKey(key string) bool
func (*ProxyClient) Decr ¶
func (pc *ProxyClient) Decr(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) Del ¶
func (pc *ProxyClient) Del(s *resp.Session, keys ...interface{}) (interface{}, error)
func (*ProxyClient) DoProbeNode ¶
func (pc *ProxyClient) DoProbeNode()
func (*ProxyClient) EvalCommon ¶
func (pc *ProxyClient) EvalCommon(command string, s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) Exists ¶
func (pc *ProxyClient) Exists(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) FillPconfigs ¶
func (pc *ProxyClient) FillPconfigs(pconfigs []*models.Pconfig) error
func (*ProxyClient) GeoAdd ¶
func (pc *ProxyClient) GeoAdd(s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) GeoDist ¶
func (pc *ProxyClient) GeoDist(s *resp.Session, args [][]byte) (interface{}, error)
func (*ProxyClient) GeoHash ¶
func (pc *ProxyClient) GeoHash(s *resp.Session, args [][]byte) (interface{}, error)
func (*ProxyClient) GeoPos ¶
func (pc *ProxyClient) GeoPos(s *resp.Session, args [][]byte) (interface{}, error)
func (*ProxyClient) GeoRadius ¶
func (pc *ProxyClient) GeoRadius(s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) GeoRadiusByMember ¶
func (pc *ProxyClient) GeoRadiusByMember(s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) Get ¶
func (pc *ProxyClient) Get(s *resp.Session, key string) (interface{}, error)
func (*ProxyClient) GetAllGroup ¶
func (pc *ProxyClient) GetAllGroup() map[int]int
func (*ProxyClient) GetMasterClients ¶
func (pc *ProxyClient) GetMasterClients() (map[int]*resp.InternalServerConn, error)
func (*ProxyClient) HClear ¶
func (pc *ProxyClient) HClear(s *resp.Session, keys ...[]byte) (interface{}, error)
func (*ProxyClient) HGetAll ¶
func (pc *ProxyClient) HGetAll(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) HKeyExists ¶
func (pc *ProxyClient) HKeyExists(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) HKeys ¶
func (pc *ProxyClient) HKeys(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) HLen ¶
func (pc *ProxyClient) HLen(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) HPersist ¶
func (pc *ProxyClient) HPersist(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) HSetWithRes ¶
func (*ProxyClient) HTtl ¶
func (pc *ProxyClient) HTtl(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) HVals ¶
func (pc *ProxyClient) HVals(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) Incr ¶
func (pc *ProxyClient) Incr(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) IncrByFloat ¶
func (pc *ProxyClient) IncrByFloat(s *resp.Session, key []byte, value interface{}) (interface{}, error)
func (*ProxyClient) KDel ¶
func (pc *ProxyClient) KDel(s *resp.Session, keys ...string) (interface{}, error)
func (*ProxyClient) KExists ¶
func (pc *ProxyClient) KExists(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) KPersist ¶
func (pc *ProxyClient) KPersist(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) KTtl ¶
func (pc *ProxyClient) KTtl(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) LClear ¶
func (pc *ProxyClient) LClear(s *resp.Session, keys ...[]byte) (interface{}, error)
func (*ProxyClient) LKeyExists ¶
func (pc *ProxyClient) LKeyExists(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) LLen ¶
func (pc *ProxyClient) LLen(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) LPersist ¶
func (pc *ProxyClient) LPersist(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) LPop ¶
func (pc *ProxyClient) LPop(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) LTrimFront ¶
func (*ProxyClient) LTtl ¶
func (pc *ProxyClient) LTtl(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) MGet ¶
func (pc *ProxyClient) MGet(s *resp.Session, keys [][]byte) (interface{}, error)
func (*ProxyClient) MSet ¶
func (pc *ProxyClient) MSet(s *resp.Session, values ...string) (interface{}, error)
func (*ProxyClient) Pconfigs ¶
func (pc *ProxyClient) Pconfigs() []*models.Pconfig
func (*ProxyClient) Persist ¶
func (pc *ProxyClient) Persist(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) RPop ¶
func (pc *ProxyClient) RPop(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) SCard ¶
func (pc *ProxyClient) SCard(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) SClear ¶
func (pc *ProxyClient) SClear(s *resp.Session, keys ...[]byte) (interface{}, error)
func (*ProxyClient) SKeyExists ¶
func (pc *ProxyClient) SKeyExists(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) SMembers ¶
func (pc *ProxyClient) SMembers(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) SPersist ¶
func (pc *ProxyClient) SPersist(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) SPop ¶
func (pc *ProxyClient) SPop(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) SPopByCount ¶
func (*ProxyClient) SRandMemberCommandWithCount ¶
func (*ProxyClient) SRandMemberCommandWithoutCount ¶
func (pc *ProxyClient) SRandMemberCommandWithoutCount(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) STtl ¶
func (pc *ProxyClient) STtl(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) ScriptExists ¶
func (pc *ProxyClient) ScriptExists(command string, s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) ScriptFlush ¶
func (pc *ProxyClient) ScriptFlush(s *resp.Session) (interface{}, error)
func (*ProxyClient) ScriptLen ¶
func (pc *ProxyClient) ScriptLen(s *resp.Session) (interface{}, error)
func (*ProxyClient) ScriptLoad ¶
func (pc *ProxyClient) ScriptLoad(s *resp.Session, script string) (interface{}, error)
func (*ProxyClient) Set ¶
func (pc *ProxyClient) Set(s *resp.Session, key string, value string, exType resp.ExpireType, expire int64) (interface{}, error)
func (*ProxyClient) Slots ¶
func (pc *ProxyClient) Slots() []*models.Slot
func (*ProxyClient) StrLen ¶
func (pc *ProxyClient) StrLen(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) Type ¶
func (pc *ProxyClient) Type(key []byte, s *resp.Session) (interface{}, error)
func (*ProxyClient) ZCard ¶
func (pc *ProxyClient) ZCard(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) ZClear ¶
func (pc *ProxyClient) ZClear(s *resp.Session, keys ...[]byte) (interface{}, error)
func (*ProxyClient) ZCount ¶
func (pc *ProxyClient) ZCount(s *resp.Session, key, min, max string) (interface{}, error)
func (*ProxyClient) ZKeyExists ¶
func (pc *ProxyClient) ZKeyExists(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) ZLexCount ¶
func (pc *ProxyClient) ZLexCount(s *resp.Session, key, min, max string) (interface{}, error)
func (*ProxyClient) ZPersist ¶
func (pc *ProxyClient) ZPersist(s *resp.Session, key []byte) (interface{}, error)
func (*ProxyClient) ZRangeByLex ¶
func (pc *ProxyClient) ZRangeByLex(s *resp.Session, args ...interface{}) (interface{}, error)
func (*ProxyClient) ZRangeByScore ¶
func (*ProxyClient) ZRemRangeByLex ¶
func (pc *ProxyClient) ZRemRangeByLex(s *resp.Session, key, min, max string) (interface{}, error)
func (*ProxyClient) ZRemRangeByRank ¶
func (*ProxyClient) ZRemRangeByScore ¶
func (pc *ProxyClient) ZRemRangeByScore(s *resp.Session, key, min, max string) (interface{}, error)
func (*ProxyClient) ZRevRangeByScore ¶
type Router ¶
type Router struct { GroupBreaker *GroupBreaker // contains filtered or unexported fields }
func (*Router) FlushGlobalStat ¶
func (r *Router) FlushGlobalStat()
func (*Router) GetAddrPool ¶
func (r *Router) GetAddrPool(addr string) (*InternalPool, bool)
func (*Router) GetAnotherConnByCircuit ¶
func (*Router) GetAntsPool ¶
func (*Router) GetMasterConn ¶
func (r *Router) GetMasterConn(slotId int) (interPool *InternalPool, err error)
func (*Router) HashForLua ¶
func (*Router) PoolStats ¶
func (r *Router) PoolStats() InternalPoolStat
Click to show internal directories.
Click to hide internal directories.