@Singleton @RequiresConsul @Requires(beans=ConsulClient.class) @Requires(property="micronaut.config-client.enabled",value="true",defaultValue="false") public class ConsulConfigurationClient extends java.lang.Object implements ConfigurationClient
ConfigurationClient
for Consul.CONFIGURATION_PREFIX, ENABLED, READ_TIMEOUT
Constructor and Description |
---|
ConsulConfigurationClient(ConsulClient consulClient,
ConsulConfiguration consulConfiguration,
Environment environment) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
A description that describes this object.
|
org.reactivestreams.Publisher<PropertySource> |
getPropertySources(Environment environment)
Retrieves all of the
PropertySource registrations for the given environment. |
public ConsulConfigurationClient(ConsulClient consulClient, ConsulConfiguration consulConfiguration, Environment environment)
consulClient
- The consul clientconsulConfiguration
- The consul configurationenvironment
- The environmentpublic java.lang.String getDescription()
Described
getDescription
in interface Described
public org.reactivestreams.Publisher<PropertySource> getPropertySources(Environment environment)
ConfigurationClient
PropertySource
registrations for the given environment.getPropertySources
in interface ConfigurationClient
environment
- The environmentPublisher
that emits zero or many PropertySource
instances discovered for the given environment