org.springframework.cloud.client.discovery.health.DiscoveryHealthIndicator Java Examples

The following examples show how to use org.springframework.cloud.client.discovery.health.DiscoveryHealthIndicator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommonsClientAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnProperty(
		value = "spring.cloud.discovery.client.composite-indicator.enabled",
		matchIfMissing = true)
@ConditionalOnBean({ DiscoveryHealthIndicator.class })
public DiscoveryCompositeHealthContributor discoveryCompositeHealthContributor(
		List<DiscoveryHealthIndicator> indicators) {
	return new DiscoveryCompositeHealthContributor(indicators);
}
 
Example #2
Source File: EurekaHealthCheckHandlerTests.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
@Bean
public DiscoveryHealthIndicator discoveryHealthIndicator() {
	return new DiscoveryClientHealthIndicator(null, null) {
		@Override
		public Health health() {
			return Health.up().build();
		}
	};
}
 
Example #3
Source File: EurekaHealthCheckHandlerTests.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
@Bean
public DiscoveryHealthIndicator eurekaHealthIndicator() {
	return new EurekaHealthIndicator(null, null, null) {
		@Override
		public Health health() {
			return Health.down().build();
		}
	};
}
 
Example #4
Source File: EurekaHealthCheckHandlerTests.java    From spring-cloud-netflix with Apache License 2.0 4 votes vote down vote up
@Bean
public DiscoveryCompositeHealthContributor discoveryCompositeHealthContributor(
		List<DiscoveryHealthIndicator> indicators) {
	return new DiscoveryCompositeHealthContributor(indicators);
}