frostfs-node/pkg/local_object_storage/blobstor/info.go
Pavel Karpy 479601ceb9 [#2057] blobstor: Block operations on a mode change
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-11-15 19:20:05 +03:00

17 lines
357 B
Go

package blobstor
// DumpInfo returns information about blob stor.
func (b *BlobStor) DumpInfo() Info {
b.modeMtx.RLock()
defer b.modeMtx.RUnlock()
sub := make([]SubStorageInfo, len(b.storage))
for i := range b.storage {
sub[i].Path = b.storage[i].Storage.Path()
sub[i].Type = b.storage[i].Storage.Type()
}
return Info{
SubStorages: sub,
}
}