[#414] ir: Serve ControlService

Serve `ControlService` instance on configured endpoint (do not serve if not
specified). Read allowed keys from config.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-09 18:49:10 +03:00 committed by Alex Vanin
parent 4001ba2967
commit 455fd952dd
5 changed files with 73 additions and 10 deletions

View file

@ -26,7 +26,7 @@ func (s *Server) HealthCheck(_ context.Context, req *control.HealthCheckRequest)
body.SetHealthStatus(s.prm.healthChecker.HealthStatus())
// sign the response
if err := SignMessage(s.prm.key, resp); err != nil {
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
return nil, status.Error(codes.Internal, err.Error())
}