forked from TrueCloudLab/frostfs-node
6e752f36dc
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
19 lines
432 B
Go
19 lines
432 B
Go
package engine
|
|
|
|
import "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
|
|
|
// DumpShard dumps objects from the shard with provided identifier.
|
|
//
|
|
// Returns an error if shard is not read-only.
|
|
func (e *StorageEngine) DumpShard(id *shard.ID, prm shard.DumpPrm) error {
|
|
e.mtx.RLock()
|
|
defer e.mtx.RUnlock()
|
|
|
|
sh, ok := e.shards[id.String()]
|
|
if !ok {
|
|
return errShardNotFound
|
|
}
|
|
|
|
_, err := sh.Dump(prm)
|
|
return err
|
|
}
|