MCPcopy Create free account
hub / github.com/distributedio/titan / MetaKey

Function MetaKey

db/db.go:243–251  ·  view source on GitHub ↗

MetaKey build to metakey from a redis key

(db *DB, key []byte)

Source from the content-addressed store, hash-verified

241
242// MetaKey build to metakey from a redis key
243func MetaKey(db *DB, key []byte) []byte {
244 var mkey []byte
245 mkey = append(mkey, []byte(db.Namespace)...)
246 mkey = append(mkey, ':')
247 mkey = append(mkey, db.ID.Bytes()...)
248 mkey = append(mkey, ':', 'M', ':')
249 mkey = append(mkey, key...)
250 return mkey
251}
252
253// DataKey builds a datakey from a redis key
254func DataKey(db *DB, key []byte) []byte {

Callers 15

expireFunction · 0.92
setHashMetaFunction · 0.85
getHashMetaFunction · 0.85
destoryHashMetaFunction · 0.85
NewZListFunction · 0.85
GetSetFunction · 0.85
updateMetaMethod · 0.85
GetHashFunction · 0.85
setMetaMethod · 0.85
delMetaMethod · 0.85
KeysMethod · 0.85
DeleteMethod · 0.85

Calls 1

BytesMethod · 0.80

Tested by 6

setHashMetaFunction · 0.68
getHashMetaFunction · 0.68
destoryHashMetaFunction · 0.68
setSetMetaFunction · 0.68
destorySetMetaFunction · 0.68
Test_doExpireFunction · 0.68