Register health APIs handler (#6999)

* DB: add block roots test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Pool: add seen atts map
* Pool: use seen atts map
* Pool: clear seen map
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* RPC: register health endpoint
* Gazelle
This commit is contained in:
terence tsao 2020-08-14 08:18:04 -07:00 committed by GitHub
parent 6db448a81d
commit b981442022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,9 @@ func (g *Gateway) Start() {
if err := pb.RegisterAuthHandlerFromEndpoint(ctx, gwmux, g.remoteAddr, opts); err != nil { if err := pb.RegisterAuthHandlerFromEndpoint(ctx, gwmux, g.remoteAddr, opts); err != nil {
log.Fatalf("Could not register API handler with grpc endpoint: %v", err) log.Fatalf("Could not register API handler with grpc endpoint: %v", err)
} }
if err := pb.RegisterHealthHandlerFromEndpoint(ctx, gwmux, g.remoteAddr, opts); err != nil {
log.Fatalf("Could not register API handler with grpc endpoint: %v", err)
}
g.mux.Handle("/", g.corsMiddleware(gwmux)) g.mux.Handle("/", g.corsMiddleware(gwmux))
g.server = &http.Server{ g.server = &http.Server{
Addr: g.gatewayAddr, Addr: g.gatewayAddr,

View File

@ -122,6 +122,7 @@ func (s *Server) Start() {
// Register services available for the gRPC server. // Register services available for the gRPC server.
reflection.Register(s.grpcServer) reflection.Register(s.grpcServer)
pb.RegisterAuthServer(s.grpcServer, s) pb.RegisterAuthServer(s.grpcServer, s)
pb.RegisterHealthServer(s.grpcServer, s)
go func() { go func() {
if s.listener != nil { if s.listener != nil {