Class VaultConfigurationClient
java.lang.Object
io.micronaut.discovery.vault.config.VaultConfigurationClient
- All Implemented Interfaces:
io.micronaut.core.naming.Described
,io.micronaut.discovery.config.ConfigurationClient
@Singleton
@Requires(beans=VaultClientConfiguration.class)
public class VaultConfigurationClient
extends Object
implements io.micronaut.discovery.config.ConfigurationClient
A
ConfigurationClient
for Vault Configuration.- Since:
- 1.2.0
- Author:
- thiagolocatelli
-
Field Summary
Fields inherited from interface io.micronaut.discovery.config.ConfigurationClient
CONFIGURATION_PREFIX, ENABLED, READ_TIMEOUT
-
Constructor Summary
ConstructorDescriptionVaultConfigurationClient
(VaultConfigHttpClient<?> configHttpClient, VaultClientConfiguration vaultClientConfiguration, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, @Nullable ExecutorService executorService) Default Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuildVaultKeys
(@Nullable String pathPrefix, @Nullable String applicationName, Set<String> environmentNames) Builds the keys used to get vault properties.@NonNull String
org.reactivestreams.Publisher<io.micronaut.context.env.PropertySource>
getPropertySources
(io.micronaut.context.env.Environment environment) 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.naming.Described
getDescription
-
Constructor Details
-
VaultConfigurationClient
public VaultConfigurationClient(VaultConfigHttpClient<?> configHttpClient, VaultClientConfiguration vaultClientConfiguration, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, @Named("io") @Nullable @Nullable ExecutorService executorService) Default Constructor.- Parameters:
configHttpClient
- The http clientvaultClientConfiguration
- Vault Client ConfigurationapplicationConfiguration
- The application configurationexecutorService
- Executor Service
-
-
Method Details
-
getPropertySources
public org.reactivestreams.Publisher<io.micronaut.context.env.PropertySource> getPropertySources(io.micronaut.context.env.Environment environment) - Specified by:
getPropertySources
in interfaceio.micronaut.discovery.config.ConfigurationClient
-
buildVaultKeys
protected Map<Integer,String> buildVaultKeys(@Nullable @Nullable String pathPrefix, @Nullable @Nullable String applicationName, Set<String> environmentNames) Builds the keys used to get vault properties.- Parameters:
pathPrefix
- The prefix path of vault keysapplicationName
- The application nameenvironmentNames
- The active environments- Returns:
- map of vault keys
-
getDescription
- Specified by:
getDescription
in interfaceio.micronaut.core.naming.Described
-