Documentation ¶
Index ¶
- Constants
- Variables
- type Bitalos
- func (b *Bitalos) Append(key []byte, khash uint32, value []byte) (int64, error)
- func (b *Bitalos) BitCount(key []byte, khash uint32, start int, end int) (int64, error)
- func (b *Bitalos) BitPos(key []byte, khash uint32, on int, start int, end int) (int64, error)
- func (b *Bitalos) BitalosdbUsage(bu *bitsdb.BitsUsage)
- func (b *Bitalos) CacheInfo() []byte
- func (b *Bitalos) CheckRedirectAndLockFunc(cmd string, key []byte, khash uint32) (bool, func())
- func (b *Bitalos) CheckpointPrepareEnd()
- func (b *Bitalos) CheckpointPrepareStart()
- func (b *Bitalos) CleanSnapshot()
- func (b *Bitalos) Close()
- func (b *Bitalos) Compact()
- func (b *Bitalos) DebugInfo() []byte
- func (b *Bitalos) Decr(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) DecrBy(key []byte, khash uint32, decrement int64) (int64, error)
- func (b *Bitalos) Del(khash uint32, keys ...[]byte) (int64, error)
- func (b *Bitalos) DoSnapshot(snapshotPath string) (interface{}, error)
- func (b *Bitalos) Exists(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) ExistsLuaScript(key []byte) (int64, error)
- func (b *Bitalos) Expire(key []byte, khash uint32, duration int64) (int64, error)
- func (b *Bitalos) ExpireAt(key []byte, khash uint32, when int64) (int64, error)
- func (b *Bitalos) Flush(reason btools.FlushType, compactIndex uint64)
- func (b *Bitalos) FlushAllDB()
- func (b *Bitalos) FlushLuaScript() error
- func (b *Bitalos) Get(key []byte, khash uint32) ([]byte, func(), error)
- func (b *Bitalos) GetBit(key []byte, khash uint32, offset int) (int64, error)
- func (b *Bitalos) GetIsDelExpire() int
- func (b *Bitalos) GetLuaScript(key []byte) ([]byte, func())
- func (b *Bitalos) GetRange(key []byte, khash uint32, start int, end int) ([]byte, func(), error)
- func (b *Bitalos) GetSet(key []byte, khash uint32, value []byte) ([]byte, func(), error)
- func (b *Bitalos) HClear(khash uint32, key ...[]byte) (int64, error)
- func (b *Bitalos) HDel(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) HGet(key []byte, khash uint32, field []byte) ([]byte, func(), error)
- func (b *Bitalos) HGetAll(key []byte, khash uint32) ([]btools.FVPair, []func(), error)
- func (b *Bitalos) HIncrBy(key []byte, khash uint32, field []byte, delta int64) (int64, error)
- func (b *Bitalos) HKeys(key []byte, khash uint32) ([][]byte, []func(), error)
- func (b *Bitalos) HLen(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) HMget(key []byte, khash uint32, args ...[]byte) ([][]byte, []func(), error)
- func (b *Bitalos) HMset(key []byte, khash uint32, args ...btools.FVPair) error
- func (b *Bitalos) HScan(key []byte, khash uint32, cursor []byte, count int, match string) ([]byte, []btools.FVPair, error)
- func (b *Bitalos) HSet(key []byte, khash uint32, field []byte, value []byte) (int64, error)
- func (b *Bitalos) HValues(key []byte, khash uint32) ([][]byte, []func(), error)
- func (b *Bitalos) Incr(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) IncrBy(key []byte, khash uint32, increment int64) (int64, error)
- func (b *Bitalos) IncrByFloat(key []byte, khash uint32, increment float64) (float64, error)
- func (b *Bitalos) IsBitsdbClosed() bool
- func (b *Bitalos) IsOpenRaftRestore() bool
- func (b *Bitalos) LClear(khash uint32, key ...[]byte) (int64, error)
- func (b *Bitalos) LIndex(key []byte, khash uint32, index int64) ([]byte, func(), error)
- func (b *Bitalos) LInsert(key []byte, khash uint32, isbefore bool, pivot, value []byte) (int64, error)
- func (b *Bitalos) LLen(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) LPop(key []byte, khash uint32) ([]byte, func(), error)
- func (b *Bitalos) LPush(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) LPushX(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) LRange(key []byte, khash uint32, start int64, stop int64) ([][]byte, error)
- func (b *Bitalos) LRem(key []byte, khash uint32, count int64, value []byte) (int64, error)
- func (b *Bitalos) LSet(key []byte, khash uint32, index int64, value []byte) error
- func (b *Bitalos) LTrim(key []byte, khash uint32, start, stop int64) error
- func (b *Bitalos) LTrimBack(key []byte, khash uint32, trimSize int64) (int64, error)
- func (b *Bitalos) LTrimFront(key []byte, khash uint32, trimSize int64) (int64, error)
- func (b *Bitalos) LuaScriptLen() int64
- func (b *Bitalos) MGet(khash uint32, keys ...[]byte) ([][]byte, []func(), error)
- func (b *Bitalos) MSet(khash uint32, args ...btools.KVPair) error
- func (b *Bitalos) MigrateOver(slotId uint64) error
- func (b *Bitalos) MigrateStart(from string, host string, slot uint32, isMaster func() bool, ...) (*Migrate, error)
- func (b *Bitalos) NewMigrate(slot uint32, tohost string, fromhost string) *Migrate
- func (b *Bitalos) PExpire(key []byte, khash uint32, duration int64) (int64, error)
- func (b *Bitalos) PExpireAt(key []byte, khash uint32, when int64) (int64, error)
- func (b *Bitalos) PSetEX(key []byte, khash uint32, duration int64, value []byte) error
- func (b *Bitalos) PSetNXEX(key []byte, khash uint32, duration int64, value []byte) (int64, error)
- func (b *Bitalos) PTTl(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) Persist(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) RPop(key []byte, khash uint32) ([]byte, func(), error)
- func (b *Bitalos) RPush(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) RPushX(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) RaftReset()
- func (b *Bitalos) RecoverFromSnapshot(r io.Reader, done <-chan struct{}) (string, error)
- func (b *Bitalos) Redirect(cmd string, key []byte, reqData [][]byte, rw *resp.Writer) error
- func (b *Bitalos) SAdd(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) SCard(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) SClear(khash uint32, key ...[]byte) (int64, error)
- func (b *Bitalos) SIsMember(key []byte, khash uint32, member []byte) (int64, error)
- func (b *Bitalos) SMembers(key []byte, khash uint32) ([][]byte, error)
- func (b *Bitalos) SPop(key []byte, khash uint32, count int64) ([][]byte, error)
- func (b *Bitalos) SRandMember(key []byte, khash uint32, count int64) ([][]byte, error)
- func (b *Bitalos) SRem(key []byte, khash uint32, args ...[]byte) (int64, error)
- func (b *Bitalos) SScan(key []byte, khash uint32, cursor []byte, count int, match string) ([]byte, [][]byte, error)
- func (b *Bitalos) SaveSnapshot(ctx interface{}, w io.Writer, done <-chan struct{}) error
- func (b *Bitalos) Scan(cursor []byte, count int, match string, dt btools.DataType) ([]byte, [][]byte, error)
- func (b *Bitalos) ScanDelExpire(jobId uint64)
- func (b *Bitalos) ScanDelExpireAsync()
- func (b *Bitalos) Set(key []byte, khash uint32, value []byte) error
- func (b *Bitalos) SetAutoCompact(val bool)
- func (b *Bitalos) SetBit(key []byte, khash uint32, offset int, on int) (int64, error)
- func (b *Bitalos) SetEX(key []byte, khash uint32, duration int64, value []byte) error
- func (b *Bitalos) SetLuaScript(key []byte, script []byte) error
- func (b *Bitalos) SetNX(key []byte, khash uint32, value []byte) (int64, error)
- func (b *Bitalos) SetNXEX(key []byte, khash uint32, duration int64, value []byte) (int64, error)
- func (b *Bitalos) SetQPS(qps uint64)
- func (b *Bitalos) SetRange(key []byte, khash uint32, offset int, value []byte) (int64, error)
- func (b *Bitalos) StrLen(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) TTl(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) Type(key []byte, khash uint32) (string, error)
- func (b *Bitalos) ZAdd(key []byte, khash uint32, args ...btools.ScorePair) (int64, error)
- func (b *Bitalos) ZCard(key []byte, khash uint32) (int64, error)
- func (b *Bitalos) ZClear(khash uint32, key ...[]byte) (int64, error)
- func (b *Bitalos) ZCount(key []byte, khash uint32, min float64, max float64, leftClose bool, ...) (int64, error)
- func (b *Bitalos) ZIncrBy(key []byte, khash uint32, delta float64, member []byte) (float64, error)
- func (b *Bitalos) ZLexCount(key []byte, khash uint32, min []byte, max []byte, leftClose bool, ...) (int64, error)
- func (b *Bitalos) ZRangeByLex(key []byte, khash uint32, min []byte, max []byte, leftClose bool, ...) ([][]byte, error)
- func (b *Bitalos) ZRangeByScoreGeneric(key []byte, khash uint32, min float64, max float64, leftClose bool, ...) ([]btools.ScorePair, error)
- func (b *Bitalos) ZRangeGeneric(key []byte, khash uint32, start int64, stop int64, reverse bool) ([]btools.ScorePair, error)
- func (b *Bitalos) ZRank(key []byte, khash uint32, member []byte) (int64, error)
- func (b *Bitalos) ZRem(key []byte, khash uint32, members ...[]byte) (int64, error)
- func (b *Bitalos) ZRemRangeByLex(key []byte, khash uint32, min []byte, max []byte, leftClose bool, ...) (int64, error)
- func (b *Bitalos) ZRemRangeByRank(key []byte, khash uint32, start int64, stop int64) (int64, error)
- func (b *Bitalos) ZRemRangeByScore(key []byte, khash uint32, min float64, max float64, leftClose bool, ...) (int64, error)
- func (b *Bitalos) ZRevRank(key []byte, khash uint32, member []byte) (int64, error)
- func (b *Bitalos) ZScan(key []byte, khash uint32, cursor []byte, count int, match string) ([]byte, []btools.ScorePair, error)
- func (b *Bitalos) ZScore(key []byte, khash uint32, member []byte) (float64, error)
- type KeyLockerPool
- type Locker
- type Migrate
- type SnapshotDetail
- type SnapshotFile
Constants ¶
View Source
const ( MigrateStatusPrepare = 0 MigrateStatusProcess = 1 MigrateStatusFinish = 2 MigrateStatusError = 3 )
View Source
const ( HeaderStartLen = 1 HeaderFileSizeLen = 8 HeaderNameLen = 2 HeaderEndLen = 1 )
Variables ¶
View Source
var ( StartHeader = byte('$') EndHeader = byte('\n') )
View Source
var MigrateLuaScript = "redis.call(KEYS)"
Functions ¶
This section is empty.
Types ¶
type Bitalos ¶
type Bitalos struct { Meta *dbmeta.Meta Migrate *Migrate // contains filtered or unexported fields }
func NewBitalos ¶
func (*Bitalos) BitalosdbUsage ¶
func (*Bitalos) CheckRedirectAndLockFunc ¶
func (*Bitalos) CheckpointPrepareEnd ¶
func (b *Bitalos) CheckpointPrepareEnd()
func (*Bitalos) CheckpointPrepareStart ¶
func (b *Bitalos) CheckpointPrepareStart()
func (*Bitalos) CleanSnapshot ¶
func (b *Bitalos) CleanSnapshot()
func (*Bitalos) DoSnapshot ¶
func (*Bitalos) FlushAllDB ¶
func (b *Bitalos) FlushAllDB()
func (*Bitalos) FlushLuaScript ¶
func (*Bitalos) GetIsDelExpire ¶
func (*Bitalos) GetLuaScript ¶
func (*Bitalos) IncrByFloat ¶
func (*Bitalos) IsBitsdbClosed ¶
func (*Bitalos) IsOpenRaftRestore ¶
func (*Bitalos) LTrimFront ¶
func (*Bitalos) LuaScriptLen ¶
func (*Bitalos) MigrateOver ¶
func (*Bitalos) MigrateStart ¶
func (*Bitalos) NewMigrate ¶
func (*Bitalos) RecoverFromSnapshot ¶
func (*Bitalos) SRandMember ¶
func (*Bitalos) SaveSnapshot ¶
func (*Bitalos) ScanDelExpire ¶
func (*Bitalos) ScanDelExpireAsync ¶
func (b *Bitalos) ScanDelExpireAsync()
func (*Bitalos) SetAutoCompact ¶
func (*Bitalos) ZRangeByLex ¶
func (*Bitalos) ZRangeByScoreGeneric ¶
func (*Bitalos) ZRangeGeneric ¶
func (*Bitalos) ZRemRangeByLex ¶
func (*Bitalos) ZRemRangeByRank ¶
func (*Bitalos) ZRemRangeByScore ¶
type KeyLockerPool ¶
type KeyLockerPool struct {
// contains filtered or unexported fields
}
func NewKeyLockerPool ¶
func NewKeyLockerPool() *KeyLockerPool
func (*KeyLockerPool) LockKey ¶
func (lp *KeyLockerPool) LockKey(khash uint32, cmd string) func()
type Migrate ¶
type SnapshotDetail ¶
func (SnapshotDetail) Clean ¶
func (detail SnapshotDetail) Clean()
type SnapshotFile ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.