frostfs-node/pkg/local_object_storage/shard/info.go
Pavel Karpy 375394dc99 [#1059] shard: Add shard mode to shard Info
Provide shard mode information via `DumpInfo()`. Delete atomic field from
Shard structure since it duplicates new field.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-30 14:14:48 +03:00

33 lines
738 B
Go

package shard
import (
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor"
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/writecache"
)
// Info groups the information about Shard.
type Info struct {
// Identifier of the shard.
ID *ID
// Shard mode.
Mode Mode
// Information about the metabase.
MetaBaseInfo meta.Info
// Information about the BLOB storage.
BlobStorInfo blobstor.Info
// Information about the Write Cache.
WriteCacheInfo writecache.Info
// Weight parameters of the shard.
WeightValues WeightValues
}
// DumpInfo returns information about the Shard.
func (s *Shard) DumpInfo() Info {
return s.info
}