forked from TrueCloudLab/frostfs-node
[#70] cmd/neofs-node: Implement Del method on in-memory bucket
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9a604a50b9
commit
276ed6c04b
1 changed files with 8 additions and 0 deletions
|
@ -69,6 +69,14 @@ func newBucket() bucket.Bucket {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *inMemBucket) Del(key []byte) error {
|
||||||
|
b.Lock()
|
||||||
|
delete(b.items, base58.Encode(key))
|
||||||
|
b.Unlock()
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (b *inMemBucket) Get(key []byte) ([]byte, error) {
|
func (b *inMemBucket) Get(key []byte) ([]byte, error) {
|
||||||
b.RLock()
|
b.RLock()
|
||||||
v, ok := b.items[base58.Encode(key)]
|
v, ok := b.items[base58.Encode(key)]
|
||||||
|
|
Loading…
Reference in a new issue