[#1840] blobstor: Return info about all components

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-10-05 15:41:36 +03:00 committed by fyrchik
parent 6d7ffefec5
commit 4b005d3178
12 changed files with 246 additions and 88 deletions

View file

@ -1,13 +1,14 @@
package blobstor
import "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree"
// DumpInfo returns information about blob stor.
func (b *BlobStor) DumpInfo() fstree.Info {
func (b *BlobStor) DumpInfo() Info {
sub := make([]SubStorageInfo, len(b.storage))
for i := range b.storage {
if b.storage[i].Storage.Type() == "fstree" {
return b.storage[i].Storage.(*fstree.FSTree).Info
}
sub[i].Path = b.storage[i].Storage.Path()
sub[i].Type = b.storage[i].Storage.Type()
}
return Info{
SubStorages: sub,
}
return fstree.Info{}
}