@EachBean(value=ServiceHttpClientConfiguration.class) @Requires(beans=HealthEndpoint.class) @Requires(classes=ServiceHttpClientConfiguration.class) @Requires(property="endpoints.health.service-http-client.enabled",defaultValue="false",notEquals="false") public class ServiceHttpClientHealthIndicator extends Object implements HealthIndicator
A HealthIndicator
used to display available load balancer URLs.
Returns HealthStatus.DOWN
if there are no available URLs in the load balancer.
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ServiceHttpClientHealthIndicator(ServiceHttpClientConfiguration configuration,
StaticServiceInstanceList instanceList) |
public ServiceHttpClientHealthIndicator(@Parameter ServiceHttpClientConfiguration configuration, @Parameter StaticServiceInstanceList instanceList)
configuration
- Configuration for the individual service http client.instanceList
- Instance List for the individual service http client. Used to obtain available load balancer URLs.public Publisher<HealthResult> getResult()
getResult
in interface HealthIndicator
HealthResult
that provides the
information necessary to build a response.