frostfs-node/pkg/local_object_storage/engine/info.go
Alex Vanin 20de74a505 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 16:38:26 +03:00

26 lines
538 B
Go

package engine
import (
"git.frostfs.info/TrueCloudLab/frostfs-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
}