forked from TrueCloudLab/frostfs-node
[#1559] metabase: Remove public functions
Reduce public interface of this package. Later each result will contain an additional status, so it makes more sense to use the same functions and result processing everywhere. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
30c7925b3c
commit
f58234aa2f
31 changed files with 234 additions and 247 deletions
|
@ -44,12 +44,16 @@ func (r SelectRes) AddressList() []oid.Address {
|
|||
// Returns any error encountered that
|
||||
// did not allow to completely select the objects.
|
||||
func (s *Shard) Select(prm SelectPrm) (SelectRes, error) {
|
||||
addrList, err := meta.Select(s.metaBase, prm.cnr, prm.filters)
|
||||
var selectPrm meta.SelectPrm
|
||||
selectPrm.WithFilters(prm.filters)
|
||||
selectPrm.WithContainerID(prm.cnr)
|
||||
|
||||
mRes, err := s.metaBase.Select(selectPrm)
|
||||
if err != nil {
|
||||
return SelectRes{}, fmt.Errorf("could not select objects from metabase: %w", err)
|
||||
}
|
||||
|
||||
return SelectRes{
|
||||
addrList: addrList,
|
||||
addrList: mRes.AddressList(),
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue