frostfs-node/pkg/services/control/server/helpers.go
Pavel Karpy 923f84722a Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-28 15:04:29 +03:00

20 lines
467 B
Go

package control
import "github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
func (s *Server) getShardIDList(raw [][]byte) []*shard.ID {
if len(raw) != 0 {
res := make([]*shard.ID, 0, len(raw))
for i := range raw {
res = append(res, shard.NewIDFromBytes(raw[i]))
}
return res
}
info := s.s.DumpInfo()
res := make([]*shard.ID, 0, len(info.Shards))
for i := range info.Shards {
res = append(res, info.Shards[i].ID)
}
return res
}