[#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

@ -13,17 +13,12 @@ type ServiceExecutor interface {
type executorSvc struct {
exec ServiceExecutor
metaHeader *session.ResponseMetaHeader
}
// NewExecutionService wraps ServiceExecutor and returns Session Service interface.
//
// Passed meta header is attached to all responses.
func NewExecutionService(exec ServiceExecutor, metaHdr *session.ResponseMetaHeader) session.Service {
func NewExecutionService(exec ServiceExecutor) session.Service {
return &executorSvc{
exec: exec,
metaHeader: metaHdr,
exec: exec,
}
}
@ -35,7 +30,6 @@ func (s *executorSvc) Create(ctx context.Context, req *session.CreateRequest) (*
resp := new(session.CreateResponse)
resp.SetBody(respBody)
resp.SetMetaHeader(s.metaHeader)
return resp, nil
}