use of io.grpc.health.v1.HealthCheckResponse.ServingStatus in project grpc-java by grpc.
the class HealthServiceImpl method check.
@Override
public void check(HealthCheckRequest request, StreamObserver<HealthCheckResponse> responseObserver) {
ServingStatus status = getStatus(request.getService());
if (status == null) {
responseObserver.onError(new StatusException(Status.NOT_FOUND));
} else {
HealthCheckResponse response = HealthCheckResponse.newBuilder().setStatus(status).build();
responseObserver.onNext(response);
responseObserver.onCompleted();
}
}
Aggregations