@Bean
    @Lazy
    public HealthIndicator grpcChannelHealthIndicator(final GrpcChannelFactory factory) {
        return () -> {
            final ImmutableMap<String, ConnectivityState> states = ImmutableMap.copyOf(factory.getConnectivityState());
            final Health.Builder health;
            if (states.containsValue(ConnectivityState.TRANSIENT_FAILURE)) {
                health = Health.outOfService();
            } else {
                health = Health.up();
            }
            return health.withDetails(states)
                    .build();
        };
    }
Creates a HealthIndicator based on the channels' {@link ConnectivityState}s from the underlying
{@link GrpcChannelFactory}.

@param factory The factory to derive the connectivity states from.
@return A health indicator bean, that uses the following assumption
        <code>DOWN == states.contains(TRANSIENT_FAILURE)</code>.
grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientHealthAutoConfiguration.java