Package com.linecorp.armeria.server.grpc
Class GrpcHealthCheckService
java.lang.Object
io.grpc.health.v1.HealthGrpc.HealthImplBase
com.linecorp.armeria.server.grpc.GrpcHealthCheckService
- All Implemented Interfaces:
io.grpc.BindableService
,io.grpc.health.v1.HealthGrpc.AsyncService
@UnstableApi
public final class GrpcHealthCheckService
extends io.grpc.health.v1.HealthGrpc.HealthImplBase
An implementation of
HealthImplBase
that determines the healthiness of a Server
and the healthiness of each gRPC service.
This class is implemented based on gRPC Health Checking Protocol.
If a service name is specified in the health check request, the service health updated by
gRPC Service HealthChecker
s is returned. If an empty service name is
specified, the server health is returned.
Note: The suggested format of service name is package_names.ServiceName
If a server is healthy, returns ServingStatus.SERVING
is returned.
For more details, please refer to the following URL.
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns a new builder which builds a newGrpcHealthCheckService
.void
check
(io.grpc.health.v1.HealthCheckRequest request, io.grpc.stub.StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) static GrpcHealthCheckService
of
(ListenableHealthChecker... healthCheckers) Returns a newly createdGrpcHealthCheckService
with the specifiedListenableHealthChecker
s.static GrpcHealthCheckService
of
(Iterable<? extends ListenableHealthChecker> healthCheckers) Returns a newly createdGrpcHealthCheckService
with the specifiedListenableHealthChecker
s.void
watch
(io.grpc.health.v1.HealthCheckRequest request, io.grpc.stub.StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) Methods inherited from class io.grpc.health.v1.HealthGrpc.HealthImplBase
bindService
-
Method Details
-
of
Returns a newly createdGrpcHealthCheckService
with the specifiedListenableHealthChecker
s. -
of
Returns a newly createdGrpcHealthCheckService
with the specifiedListenableHealthChecker
s. -
builder
Returns a new builder which builds a newGrpcHealthCheckService
. -
check
public void check(io.grpc.health.v1.HealthCheckRequest request, io.grpc.stub.StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) -
watch
public void watch(io.grpc.health.v1.HealthCheckRequest request, io.grpc.stub.StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver)
-