From cea1de3a27cf233a655145f6264e441e0da2a1e9 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 9 Nov 2021 18:40:08 +0300 Subject: [PATCH] [#922] storage engine: Remove unused Exists method Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/engine/exists.go | 40 ----------------------- 1 file changed, 40 deletions(-) diff --git a/pkg/local_object_storage/engine/exists.go b/pkg/local_object_storage/engine/exists.go index 9d75d3c095..3ff35937a1 100644 --- a/pkg/local_object_storage/engine/exists.go +++ b/pkg/local_object_storage/engine/exists.go @@ -9,46 +9,6 @@ import ( "go.uber.org/zap" ) -// ExistsPrm groups the parameters of Exists operation. -type ExistsPrm struct { - addr *objectSDK.Address -} - -// ExistsRes groups resulting values of Exists operation. -type ExistsRes struct { - ex bool -} - -// WithAddress is an Exists option to set object checked for existence. -func (p *ExistsPrm) WithAddress(addr *objectSDK.Address) *ExistsPrm { - if p != nil { - p.addr = addr - } - - return p -} - -// Exists returns the fact that the object is in the storage engine. -func (p *ExistsRes) Exists() bool { - return p.ex -} - -// Exists checks if object is presented in storage engine -// -// Returns any error encountered that does not allow to -// unambiguously determine the presence of an object. -func (e *StorageEngine) Exists(prm *ExistsPrm) (*ExistsRes, error) { - if e.metrics != nil { - defer elapsed(e.metrics.AddExistsDuration)() - } - - exists, err := e.exists(prm.addr) - - return &ExistsRes{ - ex: exists, - }, err -} - func (e *StorageEngine) exists(addr *objectSDK.Address) (bool, error) { shPrm := new(shard.ExistsPrm).WithAddress(addr) alreadyRemoved := false