[#2068] blobstor: Allow to provide storage ID in Exists
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
6ad2b5d5b8
commit
63f604e948
5 changed files with 101 additions and 4 deletions
|
@ -10,6 +10,17 @@ import (
|
|||
|
||||
// Exists implements common.Storage.
|
||||
func (b *Blobovniczas) Exists(prm common.ExistsPrm) (common.ExistsRes, error) {
|
||||
if prm.StorageID != nil {
|
||||
id := blobovnicza.NewIDFromBytes(prm.StorageID)
|
||||
blz, err := b.openBlobovnicza(id.String())
|
||||
if err != nil {
|
||||
return common.ExistsRes{}, err
|
||||
}
|
||||
|
||||
exists, err := blz.Exists(prm.Address)
|
||||
return common.ExistsRes{Exists: exists}, err
|
||||
}
|
||||
|
||||
activeCache := make(map[string]struct{})
|
||||
|
||||
var gPrm blobovnicza.GetPrm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue