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:
BindableService
@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 HealthCheckers 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.voidcheck(io.grpc.health.v1.HealthCheckRequest request, StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) static GrpcHealthCheckServiceof(com.linecorp.armeria.server.healthcheck.ListenableHealthChecker... healthCheckers) Returns a newly createdGrpcHealthCheckServicewith the specifiedListenableHealthCheckers.static GrpcHealthCheckServiceof(Iterable<? extends com.linecorp.armeria.server.healthcheck.ListenableHealthChecker> healthCheckers) Returns a newly createdGrpcHealthCheckServicewith the specifiedListenableHealthCheckers.voidwatch(io.grpc.health.v1.HealthCheckRequest request, StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) Methods inherited from class io.grpc.health.v1.HealthGrpc.HealthImplBase
bindService
-
Method Details
-
of
public static GrpcHealthCheckService of(com.linecorp.armeria.server.healthcheck.ListenableHealthChecker... healthCheckers) Returns a newly createdGrpcHealthCheckServicewith the specifiedListenableHealthCheckers. -
of
public static GrpcHealthCheckService of(Iterable<? extends com.linecorp.armeria.server.healthcheck.ListenableHealthChecker> healthCheckers) Returns a newly createdGrpcHealthCheckServicewith the specifiedListenableHealthCheckers. -
builder
Returns a new builder which builds a newGrpcHealthCheckService. -
check
public void check(io.grpc.health.v1.HealthCheckRequest request, StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) - Overrides:
checkin classio.grpc.health.v1.HealthGrpc.HealthImplBase
-
watch
public void watch(io.grpc.health.v1.HealthCheckRequest request, StreamObserver<io.grpc.health.v1.HealthCheckResponse> responseObserver) - Overrides:
watchin classio.grpc.health.v1.HealthGrpc.HealthImplBase
-