Skip to content

Commit a305927

Browse files
shaneuttk8s-ci-robot
authored andcommitted
fix: add required List() method to epp health server
Signed-off-by: Shane Utt <[email protected]>
1 parent 43da9fa commit a305927

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmd/epp/health.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ func (s *healthServer) Check(ctx context.Context, in *healthPb.HealthCheckReques
4848
return &healthPb.HealthCheckResponse{Status: healthPb.HealthCheckResponse_SERVING}, nil
4949
}
5050

51+
func (s *healthServer) List(ctx context.Context, _ *healthPb.HealthListRequest) (*healthPb.HealthListResponse, error) {
52+
// currently only the ext_proc service is provided
53+
serviceHealthResponse, err := s.Check(ctx, &healthPb.HealthCheckRequest{Service: extProcPb.ExternalProcessor_ServiceDesc.ServiceName})
54+
if err != nil {
55+
return nil, err
56+
}
57+
58+
return &healthPb.HealthListResponse{
59+
Statuses: map[string]*healthPb.HealthCheckResponse{
60+
extProcPb.ExternalProcessor_ServiceDesc.ServiceName: serviceHealthResponse,
61+
},
62+
}, nil
63+
}
64+
5165
func (s *healthServer) Watch(in *healthPb.HealthCheckRequest, srv healthPb.Health_WatchServer) error {
5266
return status.Error(codes.Unimplemented, "Watch is not implemented")
5367
}

0 commit comments

Comments
 (0)