HomePhabricator
Diffusion Comm e9473c9faa8f

[services] Tunnelbroker - Wrap gRPC Get message response into a function in…

Description

[services] Tunnelbroker - Wrap gRPC Get message response into a function in Tunnelbroker

Summary:
Wrap gRPC Get handler message response into a function because the same logic exists for sending a response on a new message from AMQP and database.
We don't need to repeat this part of the code and must wrap it into a reusable function.
As this part is for Get handler specific, there is no reason to make this a separate class private function. We can move it to internal lambda.

Linear task: ENG-1043

Test Plan: Run yarn run-tunnelbroker-service and successfully built the service.

Reviewers: karol-bisztyga, varun, ashoat

Reviewed By: karol-bisztyga, ashoat

Subscribers: ashoat, palys-swm, Adrian, atul, karol-bisztyga, yayabosh

Differential Revision: https://phabricator.ashoat.com/D3914