Class ServiceHttpClientHealthIndicator
java.lang.Object
io.micronaut.management.health.indicator.client.ServiceHttpClientHealthIndicator
- All Implemented Interfaces:
Ordered
,HealthIndicator
@EachBean(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.
- Since:
- 3.9
- Author:
- Alexander Simpson
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionServiceHttpClientHealthIndicator
(ServiceHttpClientConfiguration configuration, StaticServiceInstanceList instanceList) -
Method Summary
-
Constructor Details
-
ServiceHttpClientHealthIndicator
public ServiceHttpClientHealthIndicator(@Parameter ServiceHttpClientConfiguration configuration, @Parameter StaticServiceInstanceList instanceList) - Parameters:
configuration
- Configuration for the individual service http client.instanceList
- Instance List for the individual service http client. Used to obtain available load balancer URLs.
-
-
Method Details
-
getResult
- Specified by:
getResult
in interfaceHealthIndicator
- Returns:
- A publisher that returns a
HealthResult
that provides the information necessary to build a response.
-