forked from TrueCloudLab/frostfs-node
ed50cf6207
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
26 lines
527 B
Go
26 lines
527 B
Go
package engine
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
|
)
|
|
|
|
// Info groups the information about StorageEngine.
|
|
type Info struct {
|
|
Shards []shard.Info
|
|
}
|
|
|
|
// DumpInfo returns information about the StorageEngine.
|
|
func (e *StorageEngine) DumpInfo() (i Info) {
|
|
e.mtx.RLock()
|
|
defer e.mtx.RUnlock()
|
|
|
|
i.Shards = make([]shard.Info, 0, len(e.shards))
|
|
|
|
for _, sh := range e.shards {
|
|
info := sh.DumpInfo()
|
|
info.ErrorCount = sh.errorCount.Load()
|
|
i.Shards = append(i.Shards, info)
|
|
}
|
|
|
|
return
|
|
}
|