Class ServiceHttpClientHealthIndicator

  • All Implemented Interfaces:
    io.micronaut.core.order.Ordered, HealthIndicator

    @EachBean(io.micronaut.http.client.ServiceHttpClientConfiguration.class)
    @Requires(beans=HealthEndpoint.class) @Requires(classes=io.micronaut.http.client.ServiceHttpClientConfiguration.class) @Requires(property="endpoints.health.service-http-client.enabled",defaultValue="false",notEquals="false")
    public class ServiceHttpClientHealthIndicator
    extends java.lang.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
    • Field Summary

      • Fields inherited from interface io.micronaut.core.order.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceHttpClientHealthIndicator​(io.micronaut.http.client.ServiceHttpClientConfiguration configuration, io.micronaut.discovery.StaticServiceInstanceList instanceList)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<HealthResult> getResult()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.core.order.Ordered

        getOrder
    • Constructor Detail

      • ServiceHttpClientHealthIndicator

        public ServiceHttpClientHealthIndicator​(@Parameter
                                                io.micronaut.http.client.ServiceHttpClientConfiguration configuration,
                                                @Parameter
                                                io.micronaut.discovery.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 Detail

      • getResult

        public org.reactivestreams.Publisher<HealthResult> getResult()
        Specified by:
        getResult in interface HealthIndicator
        Returns:
        A publisher that returns a HealthResult that provides the information necessary to build a response.