Documentation ¶
Index ¶
- Constants
- Variables
- func HDataDecoder(rawkey []byte) ([]byte, []byte, error)
- func HDataEncoder(key, field []byte) []byte
- func HMetaDecoder(rawkey []byte) ([]byte, error)
- func HMetaEncoder(key []byte) []byte
- func LDataDecoder(rawkey []byte) ([]byte, uint64, error)
- func LDataEncoder(key []byte, idx uint64) []byte
- func LMetaDecoder(rawkey []byte) ([]byte, error)
- func LMetaEncoder(key []byte) []byte
- func NewTTLChecker(datatype byte, max, interval int, tdb *Tidis) *ttlChecker
- func SDataDecoder(rawkey []byte) ([]byte, []byte, error)
- func SDataEncoder(key, member []byte) []byte
- func SDecoder(rawkey []byte) ([]byte, error)
- func SEncoder(key []byte) []byte
- func SMetaDecoder(rawkey []byte) ([]byte, error)
- func SMetaEncoder(key []byte) []byte
- func TDSDecoder(rawkey []byte) ([]byte, error)
- func TDSEncoder(key []byte) []byte
- func TMHDecoder(rawkey []byte) ([]byte, uint64, error)
- func TMHEncoder(key []byte, ts uint64) []byte
- func TMLDecoder(rawkey []byte) ([]byte, uint64, error)
- func TMLEncoder(key []byte, ts uint64) []byte
- func TMSDecoder(rawkey []byte) ([]byte, uint64, error)
- func TMSEncoder(key []byte, ts uint64) []byte
- func TMSetDecoder(rawkey []byte) ([]byte, uint64, error)
- func TMSetEncoder(key []byte, ts uint64) []byte
- func TMZDecoder(rawkey []byte) ([]byte, uint64, error)
- func TMZEncoder(key []byte, ts uint64) []byte
- func TTLExpired(ttl int64) bool
- func ZDataDecoder(rawkey []byte) ([]byte, []byte, error)
- func ZDataEncoder(key, member []byte) []byte
- func ZDataEncoderEnd(key []byte) []byte
- func ZDataEncoderStart(key []byte) []byte
- func ZMetaDecoder(rawkey []byte) ([]byte, error)
- func ZMetaEncoder(key []byte) []byte
- func ZScoreDecoder(rawkey []byte) ([]byte, []byte, int64, error)
- func ZScoreEncoder(key, member []byte, score int64) []byte
- func ZScoreOffset(score int64) uint64
- func ZScoreRestore(rscore uint64) int64
- type AsyncDelItem
- type MemberPair
- type Tidis
- func (tidis *Tidis) AsyncDelAdd(keyType byte, ukey []byte) error
- func (tidis *Tidis) AsyncDelDone(keyType byte, ukey []byte) error
- func (tidis *Tidis) ClearExpire(txn interface{}, key []byte) error
- func (tidis *Tidis) Close() error
- func (tidis *Tidis) Decr(key []byte, step int64) (int64, error)
- func (tidis *Tidis) DecrWithTxn(txn interface{}, key []byte, step int64) (int64, error)
- func (tidis *Tidis) Delete(txn interface{}, keys [][]byte) (int, error)
- func (tidis *Tidis) DeleteIfExpired(txn interface{}, key []byte) error
- func (tidis *Tidis) Expire(key []byte, s int64) (int, error)
- func (tidis *Tidis) ExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) ExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) ExpireWithTxn(txn interface{}, key []byte, s int64) (int, error)
- func (tidis *Tidis) Get(txn interface{}, key []byte) ([]byte, error)
- func (tidis *Tidis) HExpire(key []byte, s int64) (int, error)
- func (tidis *Tidis) HExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) HExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) HExpireWithTxn(txn interface{}, key []byte, s int64) (int, error)
- func (tidis *Tidis) HPExpire(key []byte, ms int64) (int, error)
- func (tidis *Tidis) HPExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) HPExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) HPExpireWithTxn(txn interface{}, key []byte, ms int64) (int, error)
- func (tidis *Tidis) HPTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) HTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) Hclear(key []byte, async bool) (uint8, error)
- func (tidis *Tidis) HclearExpire(txn interface{}, key []byte) error
- func (tidis *Tidis) HclearWithTxn(txn1 interface{}, key []byte, async *bool) (uint8, error)
- func (tidis *Tidis) Hdel(key []byte, fields ...[]byte) (uint64, error)
- func (tidis *Tidis) HdelWithTxn(txn interface{}, key []byte, fields ...[]byte) (uint64, error)
- func (tidis *Tidis) HdeleteIfExpired(txn interface{}, key []byte) error
- func (tidis *Tidis) Hexists(txn interface{}, key, field []byte) (bool, error)
- func (tidis *Tidis) Hget(txn interface{}, key, field []byte) ([]byte, error)
- func (tidis *Tidis) Hgetall(txn interface{}, key []byte) ([]interface{}, error)
- func (tidis *Tidis) Hkeys(txn interface{}, key []byte) ([]interface{}, error)
- func (tidis *Tidis) Hlen(txn interface{}, key []byte) (uint64, error)
- func (tidis *Tidis) Hmget(txn interface{}, key []byte, fields ...[]byte) ([]interface{}, error)
- func (tidis *Tidis) Hmset(key []byte, fieldsvalues ...[]byte) error
- func (tidis *Tidis) HmsetWithTxn(txn interface{}, key []byte, fieldsvalues ...[]byte) error
- func (tidis *Tidis) Hset(key, field, value []byte) (uint8, error)
- func (tidis *Tidis) HsetWithTxn(txn interface{}, key, field, value []byte) (uint8, error)
- func (tidis *Tidis) Hsetnx(key, field, value []byte) (uint8, error)
- func (tidis *Tidis) HsetnxWithTxn(txn interface{}, key, field, value []byte) (uint8, error)
- func (tidis *Tidis) Hstrlen(txn interface{}, key, field []byte) (int, error)
- func (tidis *Tidis) Hvals(txn interface{}, key []byte) ([]interface{}, error)
- func (tidis *Tidis) Incr(key []byte, step int64) (int64, error)
- func (tidis *Tidis) IncrWithTxn(txn interface{}, key []byte, step int64) (int64, error)
- func (tidis *Tidis) LExpire(key []byte, s int64) (int, error)
- func (tidis *Tidis) LExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) LExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) LExpireWithTxn(txn interface{}, key []byte, s int64) (int, error)
- func (tidis *Tidis) LPExpire(key []byte, ms int64) (int, error)
- func (tidis *Tidis) LPExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) LPExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) LPExpireWithTxn(txn interface{}, key []byte, ms int64) (int, error)
- func (tidis *Tidis) LPTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) LTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) LazyCheck() bool
- func (tidis *Tidis) LclearExpire(txn interface{}, key []byte) error
- func (tidis *Tidis) LdelWithTxn(txn1 interface{}, key []byte, async *bool) (int, error)
- func (tidis *Tidis) Ldelete(key []byte, async bool) (int, error)
- func (tidis *Tidis) LdeleteIfExpired(txn interface{}, key []byte) error
- func (tidis *Tidis) Lindex(txn interface{}, key []byte, index int64) ([]byte, error)
- func (tidis *Tidis) Llen(txn interface{}, key []byte) (uint64, error)
- func (tidis *Tidis) Lpop(txn interface{}, key []byte) ([]byte, error)
- func (tidis *Tidis) Lpush(txn interface{}, key []byte, items ...[]byte) (uint64, error)
- func (tidis *Tidis) Lrange(txn interface{}, key []byte, start, stop int64) ([]interface{}, error)
- func (tidis *Tidis) Lset(key []byte, index int64, value []byte) error
- func (tidis *Tidis) LsetWithTxn(txn interface{}, key []byte, index int64, value []byte) error
- func (tidis *Tidis) Ltrim(key []byte, start, stop int64) error
- func (tidis *Tidis) LtrimWithTxn(txn interface{}, key []byte, start, stop int64) error
- func (tidis *Tidis) MGet(txn interface{}, keys [][]byte) ([]interface{}, error)
- func (tidis *Tidis) MSet(txn interface{}, keyvals [][]byte) (int, error)
- func (tidis *Tidis) NewTxn() (interface{}, error)
- func (tidis *Tidis) PExpire(key []byte, ms int64) (int, error)
- func (tidis *Tidis) PExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) PExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) PExpireWithTxn(txn interface{}, key []byte, ms int64) (int, error)
- func (tidis *Tidis) PTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) Rpop(txn interface{}, key []byte) ([]byte, error)
- func (tidis *Tidis) Rpush(txn interface{}, key []byte, items ...[]byte) (uint64, error)
- func (tidis *Tidis) RunAsync()
- func (tidis *Tidis) SExpire(key []byte, s int64) (int, error)
- func (tidis *Tidis) SExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) SExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) SExpireWithTxn(txn interface{}, key []byte, s int64) (int, error)
- func (tidis *Tidis) SPExpire(key []byte, ms int64) (int, error)
- func (tidis *Tidis) SPExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) SPExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) SPExpireWithTxn(txn interface{}, key []byte, ms int64) (int, error)
- func (tidis *Tidis) SPTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) STtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) Sadd(key []byte, members ...[]byte) (uint64, error)
- func (tidis *Tidis) SaddWithTxn(txn interface{}, key []byte, members ...[]byte) (uint64, error)
- func (tidis *Tidis) Scard(txn interface{}, key []byte) (uint64, error)
- func (tidis *Tidis) Sclear(async bool, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) SclearExpire(txn interface{}, key []byte) error
- func (tidis *Tidis) SclearKeyWithTxn(txn1 interface{}, key []byte, async *bool, lazyCheckConstraint bool) (int, error)
- func (tidis *Tidis) SclearWithTxn(async *bool, lazyCheckConstraint bool, txn interface{}, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) SdeleteIfExpired(txn interface{}, key []byte) error
- func (tidis *Tidis) Sdiff(txn interface{}, keys ...[]byte) ([]interface{}, error)
- func (tidis *Tidis) Sdiffstore(dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) SdiffstoreWithTxn(txn interface{}, dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) Set(txn interface{}, key, value []byte) error
- func (tidis *Tidis) SetWithParam(txn interface{}, key, value []byte, msTtl int64, nxFlag bool, xxFlag bool) (bool, error)
- func (tidis *Tidis) Setex(key []byte, sec int64, value []byte) error
- func (tidis *Tidis) SetexWithTxn(txn interface{}, key []byte, sec int64, value []byte) error
- func (tidis *Tidis) Sinter(txn interface{}, keys ...[]byte) ([]interface{}, error)
- func (tidis *Tidis) Sinterstore(dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) SinterstoreWithTxn(txn interface{}, dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) Sismember(txn interface{}, key, member []byte) (uint8, error)
- func (tidis *Tidis) Smembers(txn interface{}, key []byte) ([]interface{}, error)
- func (tidis *Tidis) Sops(txn interface{}, opType int, keys ...[]byte) ([]interface{}, error)
- func (tidis *Tidis) SopsStore(opType int, dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) SopsStoreWithTxn(txn interface{}, opType int, dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) Srem(key []byte, members ...[]byte) (uint64, error)
- func (tidis *Tidis) SremWithTxn(txn interface{}, key []byte, members ...[]byte) (uint64, error)
- func (tidis *Tidis) Sunion(txn interface{}, keys ...[]byte) ([]interface{}, error)
- func (tidis *Tidis) Sunionstore(dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) SunionstoreWithTxn(txn interface{}, dest []byte, keys ...[]byte) (uint64, error)
- func (tidis *Tidis) Ttl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) ZExpire(key []byte, s int64) (int, error)
- func (tidis *Tidis) ZExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) ZExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) ZExpireWithTxn(txn interface{}, key []byte, s int64) (int, error)
- func (tidis *Tidis) ZPExpire(key []byte, ms int64) (int, error)
- func (tidis *Tidis) ZPExpireAt(key []byte, ts int64) (int, error)
- func (tidis *Tidis) ZPExpireAtWithTxn(txn interface{}, key []byte, ts int64) (int, error)
- func (tidis *Tidis) ZPExpireWithTxn(txn interface{}, key []byte, ms int64) (int, error)
- func (tidis *Tidis) ZPTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) ZTtl(txn interface{}, key []byte) (int64, error)
- func (tidis *Tidis) Zadd(key []byte, mps ...*MemberPair) (int, error)
- func (tidis *Tidis) ZaddWithTxn(txn interface{}, key []byte, mps ...*MemberPair) (int, error)
- func (tidis *Tidis) Zcard(txn interface{}, key []byte) (uint64, error)
- func (tidis *Tidis) Zcount(txn interface{}, key []byte, min, max int64) (uint64, error)
- func (tidis *Tidis) Zincrby(key []byte, delta int64, member []byte) (int64, error)
- func (tidis *Tidis) ZincrbyWithTxn(txn interface{}, key []byte, delta int64, member []byte) (int64, error)
- func (tidis *Tidis) Zlexcount(txn interface{}, key, start, stop []byte) (uint64, error)
- func (tidis *Tidis) Zrange(txn interface{}, key []byte, start, stop int64, withscores bool, reverse bool) ([]interface{}, error)
- func (tidis *Tidis) Zrangebylex(txn interface{}, key []byte, start, stop []byte, offset, count int, ...) ([]interface{}, error)
- func (tidis *Tidis) Zrangebyscore(txn interface{}, key []byte, min, max int64, withscores bool, ...) ([]interface{}, error)
- func (tidis *Tidis) Zrank(txn interface{}, key, member []byte, score int64) (int64, bool, error)
- func (tidis *Tidis) Zrem(key []byte, members ...[]byte) (uint64, error)
- func (tidis *Tidis) ZremWithTxn(txn interface{}, key []byte, members ...[]byte) (uint64, error)
- func (tidis *Tidis) Zremrangebylex(key, start, stop []byte) (uint64, error)
- func (tidis *Tidis) ZremrangebylexWithTxn(txn interface{}, key, start, stop []byte) (uint64, error)
- func (tidis *Tidis) Zremrangebyscore(key []byte, min, max int64, async bool) (uint64, error)
- func (tidis *Tidis) ZremrangebyscoreWithTxn(txn1 interface{}, key []byte, min, max int64, async *bool) (uint64, error)
- func (tidis *Tidis) Zscore(txn interface{}, key, member []byte) (int64, bool, error)
Constants ¶
View Source
const ( LHeadDirection uint8 = 0 LTailDirection uint8 = 1 LItemMinIndex uint64 = 1024 LItemMaxIndex uint64 = 1<<64 - 1024 LItemInitIndex uint64 = 1<<32 - 512 )
View Source
const ( TSTRING byte = iota TLISTMETA TLISTDATA THASHMETA THASHDATA TSETMETA TSETDATA TZSETMETA TZSETSCORE TZSETDATA TTTLMETA TTTLDATA )
View Source
const ( FNORMAL byte = iota FDELETED )
Variables ¶
View Source
var (
EmptyListOrSet []interface{} = make([]interface{}, 0)
)
Functions ¶
func HDataEncoder ¶
data key type(1)|keylen(2)|key|field
func HMetaDecoder ¶
func LDataEncoder ¶
list data key type(1)|keylen(2)|key|index(8)
func LMetaDecoder ¶
func NewTTLChecker ¶
func SDataEncoder ¶
func SMetaDecoder ¶
func TDSDecoder ¶
func TDSEncoder ¶
for ttl get type(ttl)|type(key_type)|key, value is unix timestamp
func TMHEncoder ¶
for ttl checker type(ttl)|type(key_type)|timestamp(8)|key
func TMLEncoder ¶
for ttl checker type(ttl)|type(key_type)|timestamp(8)|key
func TMSEncoder ¶
for ttl checker type(ttl)|type(key_type)|timestamp(8)|key
func TMSetEncoder ¶
for ttl checker type(ttl)|type(key_type)|timestamp(8)|key
func TMZEncoder ¶
for ttl checker type(ttl)|type(key_type)|timestamp(8)|key
func ZDataEncoder ¶
type|len(key)|key|len(member)|member value: member score
func ZDataEncoderEnd ¶
func ZDataEncoderStart ¶
func ZMetaDecoder ¶
func ZScoreEncoder ¶
type|len(key)|key|score|member
func ZScoreOffset ¶
func ZScoreRestore ¶
Types ¶
type AsyncDelItem ¶
type AsyncDelItem struct {
// contains filtered or unexported fields
}
type MemberPair ¶
type Tidis ¶
func (*Tidis) ClearExpire ¶
func (*Tidis) DecrWithTxn ¶
func (*Tidis) DeleteIfExpired ¶
func (*Tidis) ExpireAtWithTxn ¶
func (*Tidis) ExpireWithTxn ¶
func (*Tidis) HExpireAtWithTxn ¶
func (*Tidis) HExpireWithTxn ¶
func (*Tidis) HPExpireAtWithTxn ¶
func (*Tidis) HPExpireWithTxn ¶
func (*Tidis) HclearExpire ¶
func (*Tidis) HclearWithTxn ¶
func (*Tidis) HdelWithTxn ¶
func (*Tidis) HdeleteIfExpired ¶
func (*Tidis) HmsetWithTxn ¶
func (*Tidis) HsetWithTxn ¶
func (*Tidis) HsetnxWithTxn ¶
func (*Tidis) IncrWithTxn ¶
func (*Tidis) LExpireAtWithTxn ¶
func (*Tidis) LExpireWithTxn ¶
func (*Tidis) LPExpireAtWithTxn ¶
func (*Tidis) LPExpireWithTxn ¶
func (*Tidis) LclearExpire ¶
clear expire flag in meta and delete ttl key
func (*Tidis) LdelWithTxn ¶
func (*Tidis) LdeleteIfExpired ¶
func (*Tidis) LsetWithTxn ¶
func (*Tidis) LtrimWithTxn ¶
func (*Tidis) PExpireAtWithTxn ¶
func (*Tidis) PExpireWithTxn ¶
func (*Tidis) SExpireAtWithTxn ¶
func (*Tidis) SExpireWithTxn ¶
func (*Tidis) SPExpireAtWithTxn ¶
func (*Tidis) SPExpireWithTxn ¶
func (*Tidis) SaddWithTxn ¶
func (*Tidis) SclearExpire ¶
func (*Tidis) SclearKeyWithTxn ¶
func (*Tidis) SclearWithTxn ¶
func (*Tidis) SdeleteIfExpired ¶
func (*Tidis) Sdiffstore ¶
func (*Tidis) SdiffstoreWithTxn ¶
func (*Tidis) SetWithParam ¶
func (*Tidis) SetexWithTxn ¶
func (*Tidis) Sinterstore ¶
func (*Tidis) SinterstoreWithTxn ¶
func (*Tidis) SopsStoreWithTxn ¶
func (*Tidis) SremWithTxn ¶
func (*Tidis) Sunionstore ¶
func (*Tidis) SunionstoreWithTxn ¶
func (*Tidis) ZExpireAtWithTxn ¶
func (*Tidis) ZExpireWithTxn ¶
func (*Tidis) ZPExpireAtWithTxn ¶
func (*Tidis) ZPExpireWithTxn ¶
func (*Tidis) ZaddWithTxn ¶
func (tidis *Tidis) ZaddWithTxn(txn interface{}, key []byte, mps ...*MemberPair) (int, error)
func (*Tidis) ZincrbyWithTxn ¶
func (*Tidis) Zrangebylex ¶
func (*Tidis) Zrangebyscore ¶
func (*Tidis) ZremWithTxn ¶
func (*Tidis) Zremrangebylex ¶
func (*Tidis) ZremrangebylexWithTxn ¶
func (*Tidis) Zremrangebyscore ¶
func (*Tidis) ZremrangebyscoreWithTxn ¶
Click to show internal directories.
Click to hide internal directories.