You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
examples/features/health: Clarify docs for health import (#8597)
The google.golang.org/grpc/health package must be imported for client
health checking to work. I somehow missed this, even though it is in the
README, the client example, and the health package docs. Attempt to make
it clearer with a few extra mentions, since it is quite hard to debug
this misconfiguration.
* Remove deprecated grpc.WithBlock function
* Make service config const since it isn't modified
Attempts to clarify Issue #8590.
RELEASE NOTES: N/A
Copy file name to clipboardExpand all lines: examples/features/health/README.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,15 +25,14 @@ Clients have two ways to monitor a servers health.
25
25
They can use `Check()` to probe a servers health or they can use `Watch()` to observe changes.
26
26
27
27
In most cases, clients do not need to directly check backend servers.
28
-
Instead, they can do this transparently when a `healthCheckConfig` is specified in the [service config](https://github.com/grpc/proposal/blob/master/A17-client-side-health-checking.md#service-config-changes).
29
-
This configuration indicates which backend `serviceName` should be inspected when connections are established.
28
+
Instead, they can do this transparently when a `healthCheckConfig` is specified in the [service config](https://github.com/grpc/proposal/blob/master/A17-client-side-health-checking.md#service-config-changes) and the [health package](https://pkg.go.dev/google.golang.org/grpc/health) is imported.
29
+
The `serviceName` in `healthCheckConfig` will be used in the health check when connections are established.
30
30
An empty string (`""`) typically indicates the overall health of a server should be reported.
31
31
32
32
```go
33
33
// import grpc/health to enable transparent client side checking
0 commit comments