forked from TrueCloudLab/frostfs-node
[#1437] node: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6921a89061
commit
7429553266
209 changed files with 1068 additions and 1036 deletions
|
@ -35,9 +35,9 @@ type Reader interface {
|
|||
// Writer is an interface of container storage updater.
|
||||
type Writer interface {
|
||||
// Put stores specified container in the side chain.
|
||||
Put(containercore.Container) (*cid.ID, error)
|
||||
Put(context.Context, containercore.Container) (*cid.ID, error)
|
||||
// Delete removes specified container from the side chain.
|
||||
Delete(containercore.RemovalWitness) error
|
||||
Delete(context.Context, containercore.RemovalWitness) error
|
||||
}
|
||||
|
||||
func NewExecutor(rdr Reader, wrt Writer) containerSvc.ServiceExecutor {
|
||||
|
@ -47,7 +47,7 @@ func NewExecutor(rdr Reader, wrt Writer) containerSvc.ServiceExecutor {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *morphExecutor) Put(_ context.Context, tokV2 *sessionV2.Token, body *container.PutRequestBody) (*container.PutResponseBody, error) {
|
||||
func (s *morphExecutor) Put(ctx context.Context, tokV2 *sessionV2.Token, body *container.PutRequestBody) (*container.PutResponseBody, error) {
|
||||
sigV2 := body.GetSignature()
|
||||
if sigV2 == nil {
|
||||
// TODO(@cthulhu-rider): #468 use "const" error
|
||||
|
@ -80,7 +80,7 @@ func (s *morphExecutor) Put(_ context.Context, tokV2 *sessionV2.Token, body *con
|
|||
}
|
||||
}
|
||||
|
||||
idCnr, err := s.wrt.Put(cnr)
|
||||
idCnr, err := s.wrt.Put(ctx, cnr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ func (s *morphExecutor) Put(_ context.Context, tokV2 *sessionV2.Token, body *con
|
|||
return res, nil
|
||||
}
|
||||
|
||||
func (s *morphExecutor) Delete(_ context.Context, tokV2 *sessionV2.Token, body *container.DeleteRequestBody) (*container.DeleteResponseBody, error) {
|
||||
func (s *morphExecutor) Delete(ctx context.Context, tokV2 *sessionV2.Token, body *container.DeleteRequestBody) (*container.DeleteResponseBody, error) {
|
||||
idV2 := body.GetContainerID()
|
||||
if idV2 == nil {
|
||||
return nil, errors.New("missing container ID")
|
||||
|
@ -124,7 +124,7 @@ func (s *morphExecutor) Delete(_ context.Context, tokV2 *sessionV2.Token, body *
|
|||
rmWitness.Signature = body.GetSignature()
|
||||
rmWitness.SessionToken = tok
|
||||
|
||||
err = s.wrt.Delete(rmWitness)
|
||||
err = s.wrt.Delete(ctx, rmWitness)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue