MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / Get

Method Get

driver/oss/db.go:261–269  ·  view source on GitHub ↗

* func (db *DB) Get(key []byte) ([]byte, error) { if v, ok := db.cache.Get(key); ok { return v.([]byte), nil } v, err := db.db.Get(key, nil) if err == leveldb.ErrNotFound { v, err = db.S3Get(key) if err != nil{ return nil, nil }else { return nil, nil } } db.cache.Set(key, v, 0

(key []byte)

Source from the content-addressed store, hash-verified

259*/
260
261func (db *DB) Get(key []byte) ([]byte, error) {
262 v, err := db.S3Get(key)
263 if err != nil {
264 //fmt.Println(" s3 get ", err)
265 return nil, nil
266 }
267
268 return v, nil
269}
270
271func (db *DB) S3Delete(key []byte) error {
272

Callers 5

dumpStoreMethod · 0.45
cmdGETFunction · 0.45
TestKVFunction · 0.45
TestErrorsFunction · 0.45
TestNilFunction · 0.45

Calls 1

S3GetMethod · 0.95

Tested by 3

TestKVFunction · 0.36
TestErrorsFunction · 0.36
TestNilFunction · 0.36