[#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
|
@ -38,7 +38,11 @@ func (p ExistsRes) Exists() bool {
|
|||
//
|
||||
// Returns an error of type apistatus.ObjectAlreadyRemoved if object has been marked as removed.
|
||||
func (s *Shard) Exists(prm ExistsPrm) (ExistsRes, error) {
|
||||
exists, err := meta.Exists(s.metaBase, prm.addr)
|
||||
var existsPrm meta.ExistsPrm
|
||||
existsPrm.WithAddress(prm.addr)
|
||||
|
||||
res, err := s.metaBase.Exists(existsPrm)
|
||||
exists := res.Exists()
|
||||
if err != nil {
|
||||
// If the shard is in degraded mode, try to consult blobstor directly.
|
||||
// Otherwise, just return an error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue