Documentation
¶
Index ¶
- func Auth(c redis.Connection, args [][]byte) redis.Reply
- func BGRewriteAOF(db *MultiDB, args [][]byte) redis.Reply
- func RegisterCommand(name string, executor ExecFunc, prepare PreFunc, rollback UndoFunc, arity int)
- func RewriteAOF(db *MultiDB, args [][]byte) redis.Reply
- type CmdLine
- type DB
- func (db *DB) Exec(c redis.Connection, cmdLine [][]byte) redis.Reply
- func (db *DB) Expire(key string, expireTime time.Time)
- func (db *DB) Flush()
- func (db *DB) ForEach(cb func(key string, data *database.DataEntity, expiration *time.Time) bool)
- func (db *DB) GetEntity(key string) (*database.DataEntity, bool)
- func (db *DB) GetVersion(key string) uint32
- func (db *DB) IsExpired(key string) bool
- func (db *DB) Persist(key string)
- func (db *DB) PutEntity(key string, entity *database.DataEntity) int
- func (db *DB) PutIfAbsent(key string, entity database.DataEntity) int
- func (db *DB) PutIfExists(key string, entity database.DataEntity) int
- func (db *DB) RWLocks(writeKeys []string, readKeys []string)
- func (db *DB) RWUnLocks(writeKeys []string, readKeys []string)
- func (db *DB) Remove(key string)
- func (db *DB) Removes(keys ...string) (deleted int)
- type ExecFunc
- type MultiDB
- func (mdb *MultiDB) AfterClientClose(c redis.Connection)
- func (mdb *MultiDB) Close()
- func (mdb *MultiDB) Exec(c redis.Connection, cmdLine [][]byte) (result redis.Reply)
- func (mdb *MultiDB) ExecMulti(conn redis.Connection, watching map[string]uint32, cmdLines []database.CmdLine) redis.Reply
- func (mdb *MultiDB) ExecWithLock(conn redis.Connection, cmdLine [][]byte) redis.Reply
- func (mdb *MultiDB) ForEach(dbIndex int, ...)
- func (mdb *MultiDB) GetDBSize(dbIndex int) (int, int)
- func (mdb *MultiDB) GetUndoLogs(dbIndex int, cmdLine [][]byte) []database.CmdLine
- func (mdb *MultiDB) RWLocks(dbIndex int, writeKeys []string, readKeys []string)
- func (mdb *MultiDB) RWUnLocks(dbIndex int, writeKeys []string, readKeys []string)
- type PreFunc
- type UndoFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BGRewriteAOF ¶
BGRewriteAOF 在后台异步的执行aof重写
func RegisterCommand ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) GetEntity ¶
func (db *DB) GetEntity(key string) (*database.DataEntity, bool)
GetEntity returns DataEntity bind to given key
func (*DB) GetVersion ¶
func (*DB) PutIfAbsent ¶
func (db *DB) PutIfAbsent(key string, entity database.DataEntity) int
func (*DB) PutIfExists ¶
func (db *DB) PutIfExists(key string, entity database.DataEntity) int
type MultiDB ¶
type MultiDB struct {
// contains filtered or unexported fields
}
func MakeBasicMultiDB ¶
func MakeBasicMultiDB() *MultiDB
func NewStandaloneServer ¶
func NewStandaloneServer() *MultiDB
func (*MultiDB) AfterClientClose ¶
func (mdb *MultiDB) AfterClientClose(c redis.Connection)
AfterClientClose does some clean after client close connection
func (*MultiDB) ExecWithLock ¶
func (*MultiDB) GetUndoLogs ¶
Click to show internal directories.
Click to hide internal directories.