Skip to content

Commit 3567400

Browse files
onobcdsyer
authored andcommitted
Add docs for grpc-services dependency
Clarifies in the docs that the grpc-services dependency is needed for health service to be autoconfigured. Also adds a section for the Reflection service and clarifies the same. Resolves #189 Signed-off-by: Chris Bono <[email protected]>
1 parent 054a04e commit 3567400

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

spring-grpc-docs/src/main/antora/modules/ROOT/pages/health.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
Spring gRPC autoconfigures the standard https://grpc.io/docs/guides/health-checking/[gRPC Health service] for performing health check calls against gRPC servers.
66
The health service is registered with the gRPC server and a `HealthStatusManager` bean is provided that can be used to update the health status of your services.
77

8+
IMPORTANT: The health service resides in the `io.grpc:grpc-services` library which is marked as `optional` by Spring gRPC. You must add this dependency to your application in order for it to be autoconfigured.
9+
810
== Actuator Health
911
When Spring Boot Actuator is added to your project and the {spring-boot-docs}/actuator/endpoints.html#actuator.endpoints.health[Health endpoint] is available, the framework will automatically periodically update the health status of a configured list of Spring Boot {spring-boot-docs}/actuator/endpoints.html#actuator.endpoints.health.auto-configured-health-indicators[health indicators], including any ({spring-boot-docs}/actuator/endpoints.html#actuator.endpoints.health.writing-custom-health-indicators[custom indicators]).
1012
By default, the aggregate status of the individual indicators is also used to update the overall server status (`""`).

spring-grpc-docs/src/main/antora/modules/ROOT/pages/server.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `Server` is the gRPC server that listens for incoming requests and routes th
88
== Create a gRPC Service
99

1010
To create a gRPC server, you need to provide one or more beans of type `BindableService`.
11-
There are some `BindableServices` available off the shelf that you could include in your application (an example is the reflection service from the `grpc-services` artifact which allows clients to browse the metadata of your services and download the Protobuf files).
11+
There are some `BindableServices` available off the shelf that you could include in your application (e.g. the <<reflection-service,gRPC Reflection>> or <<health-service,gRPC Health>> services).
1212
Very commonly, you will create your own `BindableService` by extending the generated service implementation from your Protobuf file.
1313
The easiest way to activate it is to simply add a Spring `@Service` annotation to the implementation class and have it picked up by the `@ComponentScan` in your Spring Boot application.
1414

@@ -150,7 +150,14 @@ However, by setting the `blendWithGlobalInterceptors` attribute on the `@GrpcSer
150150
You can use this option if you want to add a per-service interceptor between global interceptors.
151151
====
152152

153-
[[health]]
153+
[[reflection-service]]
154+
== Reflection
155+
156+
Spring gRPC autoconfigures the standard https://grpc.io/docs/guides/reflection/[gRPC Reflection service] which allows clients to browse the metadata of your services and download the Protobuf files.
157+
158+
IMPORTANT: The reflection service resides in the `io.grpc:grpc-services` library which is marked as `optional` by Spring gRPC. You must add this dependency to your application in order for it to be autoconfigured.
159+
160+
[[health-service]]
154161
include::health.adoc[leveloffset=+1]
155162

156163
== Observability

0 commit comments

Comments
 (0)