Skip to content

Commit

Permalink
Merge pull request #83 from getamis/return-resposne
Browse files Browse the repository at this point in the history
health: return non nil response
  • Loading branch information
markya0616 authored Jul 16, 2021
2 parents 14ffb60 + 3359056 commit f7a5209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions health/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ func (s *server) Shutdown() {

// Liveness is represented that whether application is able to make progress or not.
func (s *server) Liveness(ctx context.Context, req *EmptyRequest) (*EmptyResponse, error) {
return nil, nil
return &EmptyResponse{}, nil
}

// Readiness is represented that whether application is ready to start accepting traffic or not.
func (s *server) Readiness(ctx context.Context, req *EmptyRequest) (*EmptyResponse, error) {
if err := checkHealth(ctx, s.checkFns); err != nil {
return nil, status.Error(codes.Unavailable, err.Error())
}
return nil, nil
return &EmptyResponse{}, nil
}

0 comments on commit f7a5209

Please sign in to comment.