Skip to content

Commit

Permalink
added server reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
simplesteph committed Oct 30, 2018
1 parent ccb91bd commit 5b949c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions calculator/calculator_server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"google.golang.org/grpc/status"

"github.com/simplesteph/grpc-go-course/calculator/calculatorpb"
"google.golang.org/grpc/reflection"

"google.golang.org/grpc"
)
Expand Down Expand Up @@ -124,6 +125,9 @@ func main() {
s := grpc.NewServer()
calculatorpb.RegisterCalculatorServiceServer(s, &server{})

// Register reflection service on gRPC server.
reflection.Register(s)

if err := s.Serve(lis); err != nil {
log.Fatalf("failed to serve: %v", err)
}
Expand Down

0 comments on commit 5b949c7

Please sign in to comment.