2022-10-10 17:54:14 +00:00
|
|
|
package control
|
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
import "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
2022-10-10 17:54:14 +00:00
|
|
|
|
2022-10-10 18:14:12 +00:00
|
|
|
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)
|
2022-10-10 17:54:14 +00:00
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|