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

Method Object

db/object.go:114–124  ·  view source on GitHub ↗

Object returns the object associated with the key

(key []byte)

Source from the content-addressed store, hash-verified

112
113// Object returns the object associated with the key
114func (txn *Transaction) Object(key []byte) (*Object, error) {
115 mkey := MetaKey(txn.db, key)
116 obj, err := getObject(txn, mkey)
117 if err != nil {
118 return nil, err
119 }
120 if IsExpired(obj, Now()) {
121 return nil, ErrKeyNotFound
122 }
123 return obj, nil
124}
125
126// Destory the object
127func (txn *Transaction) Destory(obj *Object, key []byte) error {

Callers 11

debugObjectFunction · 0.80
PersistFunction · 0.80
TTLFunction · 0.80
PTTLFunction · 0.80
ObjectFunction · 0.80
TypeFunction · 0.80
SetFunction · 0.80
SetExFunction · 0.80
PSetExFunction · 0.80
CheckNotFoundKeyFunction · 0.80
EqualExpireAtFunction · 0.80

Calls 4

MetaKeyFunction · 0.85
getObjectFunction · 0.85
IsExpiredFunction · 0.85
NowFunction · 0.85

Tested by 2

CheckNotFoundKeyFunction · 0.64
EqualExpireAtFunction · 0.64