Skip to content

Commit 43da9fa

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

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmd/bbr/health.go

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

44+
func (s *healthServer) List(ctx context.Context, _ *healthPb.HealthListRequest) (*healthPb.HealthListResponse, error) {
45+
// currently only the ext_proc service is provided
46+
serviceHealthResponse, err := s.Check(ctx, &healthPb.HealthCheckRequest{Service: extProcPb.ExternalProcessor_ServiceDesc.ServiceName})
47+
if err != nil {
48+
return nil, err
49+
}
50+
51+
return &healthPb.HealthListResponse{
52+
Statuses: map[string]*healthPb.HealthCheckResponse{
53+
extProcPb.ExternalProcessor_ServiceDesc.ServiceName: serviceHealthResponse,
54+
},
55+
}, nil
56+
}
57+
4458
func (s *healthServer) Watch(in *healthPb.HealthCheckRequest, srv healthPb.Health_WatchServer) error {
4559
return status.Error(codes.Unimplemented, "Watch is not implemented")
4660
}

0 commit comments

Comments
 (0)