@Singleton @RequiresConsul @Requires(beans=ConsulClient.class) @Requires(property="micronaut.config-client.enabled",value="true",defaultValue="false") public class ConsulConfigurationClient extends 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 |
---|---|
String |
getDescription()
A description that describes this object.
|
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 String getDescription()
Described
getDescription
in interface Described
public 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