Documentation ¶
Index ¶
- func NewMemcache() icache.ICacher
- type MemCacheConnect
- type Memcach
- func (r *Memcach) Del(key string) bool
- func (r *Memcach) FlushDB() bool
- func (r *Memcach) Get(key string, value interface{}) bool
- func (r *Memcach) Master() icache.ICacher
- func (r *Memcach) Set(key string, value interface{}, overtime int64) bool
- func (r *Memcach) SetPool(pooler MemcachePooler) icache.ICacher
- func (r *Memcach) Slave() icache.ICacher
- func (r *Memcach) SlaveByName(name string) icache.ICacher
- type MemcachePool
- type MemcachePooler
- type Memcacher
- type SlaveDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemCacheConnect ¶
MemCacheConnect 连接配置
type Memcach ¶
type Memcach struct {
// contains filtered or unexported fields
}
Memcach Memcach对象
type MemcachePool ¶
type MemcachePool struct {
// contains filtered or unexported fields
}
RedisPool 连接池
func (*MemcachePool) GetMaster ¶
func (r *MemcachePool) GetMaster() *memcache.Client
GetMaster 获得主memcache
func (*MemcachePool) GetSlave ¶
func (r *MemcachePool) GetSlave() *memcache.Client
GetSlave 获得从memcache
func (*MemcachePool) GetSlaveByName ¶
func (r *MemcachePool) GetSlaveByName(name string) *memcache.Client
GetSlaveByName 获得从memcache通过名称
type MemcachePooler ¶
type MemcachePooler interface { GetMaster() *memcache.Client GetSlave() *memcache.Client GetSlaveByName(name string) *memcache.Client Init(connect MemCacheConnect) }
MemcachePooler 连接池接口
Click to show internal directories.
Click to hide internal directories.