Package io.micronaut.discovery.consul
Class ConsulConfiguration.ConsulDiscoveryConfiguration
java.lang.Object
io.micronaut.discovery.DiscoveryConfiguration
io.micronaut.discovery.consul.ConsulConfiguration.ConsulDiscoveryConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Enclosing class:
- ConsulConfiguration
@ConfigurationProperties("discovery")
@Requires(property="consul.client")
public static class ConsulConfiguration.ConsulDiscoveryConfiguration
extends io.micronaut.discovery.DiscoveryConfiguration
Configuration class for Consul client discovery.
-
Field Summary
Fields inherited from class io.micronaut.discovery.DiscoveryConfiguration
DEFAULT_ENABLED, PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA map of service ID to data centers to query.A map of service ID to protocol scheme (eg.getTags()
A map of service ID to tags to use for querying.boolean
Whether services that are not passing health checks should be returned.void
setDatacenters
(Map<String, String> datacenters) void
setPassing
(boolean passing) void
setSchemes
(Map<String, String> schemes) void
toString()
Methods inherited from class io.micronaut.discovery.DiscoveryConfiguration
isEnabled, setEnabled
-
Constructor Details
-
ConsulDiscoveryConfiguration
public ConsulDiscoveryConfiguration()
-
-
Method Details
-
isPassing
public boolean isPassing()Whether services that are not passing health checks should be returned.- Returns:
- True if only passing services should be returned (defaults to false)
-
setPassing
public void setPassing(boolean passing) - Parameters:
passing
- Whether services that are not passing health checks should be returned
-
getTags
A map of service ID to tags to use for querying.- Returns:
- The tags
-
setTags
- Parameters:
tags
- The tags to use for querying
-
getDatacenters
A map of service ID to data centers to query.- Returns:
- The map to query
-
setDatacenters
- Parameters:
datacenters
- The data centers to query
-
getSchemes
A map of service ID to protocol scheme (eg. http, https etc.). Default is http.- Returns:
- A map of schemes
-
setSchemes
- Parameters:
schemes
- The service ID to protocol scheme
-
toString
-