[#1402] ir: Move GetSG interface

`auditor` does not need to request SG: processor will fetch that info before
audit context initialization.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-05-19 22:39:43 +03:00 committed by fyrchik
parent 6370c2e160
commit 7864959d0c
4 changed files with 25 additions and 20 deletions

View file

@ -62,12 +62,12 @@ func (c *ClientCache) Get(info clientcore.NodeInfo) (clientcore.Client, error) {
// Returns storage groups structure from received object.
//
// Returns an error of type apistatus.ObjectNotFound if storage group is missing.
func (c *ClientCache) GetSG(prm auditor.GetSGPrm) (*storagegroup.StorageGroup, error) {
func (c *ClientCache) GetSG(prm auditproc.GetSGPrm) (*storagegroup.StorageGroup, error) {
var sgAddress oid.Address
sgAddress.SetContainer(prm.CID)
sgAddress.SetObject(prm.OID)
return c.getSG(prm.Context, sgAddress, prm.NetMap, prm.Container)
return c.getSG(prm.Context, sgAddress, &prm.NetMap, prm.Container)
}
func (c *ClientCache) getSG(ctx context.Context, addr oid.Address, nm *netmap.NetMap, cn [][]netmap.NodeInfo) (*storagegroup.StorageGroup, error) {