[#83] services: Remove setting of meta header from executing services

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-10-22 14:12:35 +03:00 committed by Alex Vanin
parent 3065a7363b
commit 19f9c7eacb
7 changed files with 6 additions and 39 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
"github.com/nspcc-dev/neofs-api-go/v2/session"
"github.com/pkg/errors"
)
@ -14,17 +13,12 @@ type ServiceExecutor interface {
type executorSvc struct {
exec ServiceExecutor
metaHeader *session.ResponseMetaHeader
}
// NewExecutionService wraps ServiceExecutor and returns Accounting Service interface.
//
// Passed meta header is attached to all responses.
func NewExecutionService(exec ServiceExecutor, metaHdr *session.ResponseMetaHeader) accounting.Service {
func NewExecutionService(exec ServiceExecutor) accounting.Service {
return &executorSvc{
exec: exec,
metaHeader: metaHdr,
exec: exec,
}
}
@ -36,7 +30,6 @@ func (s *executorSvc) Balance(ctx context.Context, req *accounting.BalanceReques
resp := new(accounting.BalanceResponse)
resp.SetBody(respBody)
resp.SetMetaHeader(s.metaHeader)
return resp, nil
}