Skip to content

Commit

Permalink
[Node] Add GRPC HealthCheck (#497)
Browse files Browse the repository at this point in the history
Co-authored-by: Siddharth More <Siddhi More>
  • Loading branch information
siddimore authored Apr 19, 2024
1 parent 090db84 commit da23ea7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/Layr-Labs/eigenda/api"
pb "github.com/Layr-Labs/eigenda/api/grpc/node"
"github.com/Layr-Labs/eigenda/common"
"github.com/Layr-Labs/eigenda/common/healthcheck"
"github.com/Layr-Labs/eigenda/core"
"github.com/Layr-Labs/eigenda/encoding"
"github.com/Layr-Labs/eigenda/node"
Expand Down Expand Up @@ -76,7 +77,6 @@ func (s *Server) Start() {
s.logger.Error("retrieval server failed; restarting.", "err", err)
}
}()

}

func (s *Server) serveDispersal() error {
Expand All @@ -95,6 +95,7 @@ func (s *Server) serveDispersal() error {
reflection.Register(gs)

pb.RegisterDispersalServer(gs, s)
healthcheck.RegisterHealthServer("node.Dispersal", gs)

s.logger.Info("port", s.config.InternalDispersalPort, "address", listener.Addr().String(), "GRPC Listening")
if err := gs.Serve(listener); err != nil {
Expand All @@ -119,6 +120,7 @@ func (s *Server) serveRetrieval() error {
reflection.Register(gs)

pb.RegisterRetrievalServer(gs, s)
healthcheck.RegisterHealthServer("node.Retrieval", gs)

s.logger.Info("port", s.config.InternalRetrievalPort, "address", listener.Addr().String(), "GRPC Listening")
if err := gs.Serve(listener); err != nil {
Expand Down

0 comments on commit da23ea7

Please sign in to comment.