Class ConsulLookup
java.lang.Object
org.kiwiproject.dropwizard.consul.config.ConsulLookup
- All Implemented Interfaces:
org.apache.commons.text.lookup.StringLookup
A custom
StringLookup
implementation using Consul KV as
lookup source.-
Constructor Summary
ConstructorDescriptionConsulLookup
(org.kiwiproject.consul.Consul consul) Create a new instance with strict behavior.ConsulLookup
(org.kiwiproject.consul.Consul consul, boolean strict) Constructor -
Method Summary
-
Constructor Details
-
ConsulLookup
public ConsulLookup(org.kiwiproject.consul.Consul consul) Create a new instance with strict behavior.- Parameters:
consul
- Consul client
-
ConsulLookup
public ConsulLookup(org.kiwiproject.consul.Consul consul, boolean strict) Constructor- Parameters:
consul
- Consul clientstrict
-true
if looking up undefined environment variables should throw aUndefinedEnvironmentVariableException
,false
otherwise.- Throws:
io.dropwizard.configuration.UndefinedEnvironmentVariableException
- if the environment variable doesn't exist and strict behavior is enabled.
-
-
Method Details
-
lookup
- Specified by:
lookup
in interfaceorg.apache.commons.text.lookup.StringLookup
- Throws:
io.dropwizard.configuration.UndefinedEnvironmentVariableException
- if the environment variable doesn't exist and strict behavior is enabled.
-