[#277] getsvc: Rename and reorder code

Rename execCtx to request.
Move code to appropriate files.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-24 12:09:43 +03:00 committed by Evgenii Stratonikov
parent 1440450606
commit 45438e7b06
15 changed files with 442 additions and 445 deletions

View file

@ -2,7 +2,6 @@ package getsvc
import (
"context"
"errors"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
@ -15,10 +14,6 @@ type objectGetter interface {
HeadObject(ctx context.Context, id oid.ID) (*objectSDK.Object, error)
}
var (
errParentAddressDiffers = errors.New("parent address in child object differs")
)
type assembler struct {
addr oid.Address
splitInfo *objectSDK.SplitInfo
@ -89,7 +84,7 @@ func (a *assembler) initializeFromSourceObjectID(ctx context.Context, id oid.ID)
parentObject := sourceObject.Parent()
if parentObject == nil {
return nil, nil, errors.New("received child with empty parent")
return nil, nil, errChildWithEmptyParent
}
a.parentObject = parentObject