Class ConsulSubstitutor


  • public class ConsulSubstitutor
    extends io.dropwizard.configuration.EnvironmentVariableSubstitutor
    A custom EnvironmentVariableSubstitutor using Consul KV as lookup source.
    • Field Summary

      • Fields inherited from class org.apache.commons.text.StringSubstitutor

        DEFAULT_ESCAPE, DEFAULT_PREFIX, DEFAULT_SUFFIX, DEFAULT_VALUE_DELIMITER, DEFAULT_VAR_DEFAULT, DEFAULT_VAR_END, DEFAULT_VAR_START
    • Constructor Summary

      Constructors 
      Constructor Description
      ConsulSubstitutor​(com.orbitz.consul.Consul consul)  
      ConsulSubstitutor​(com.orbitz.consul.Consul consul, boolean strict)  
      ConsulSubstitutor​(com.orbitz.consul.Consul consul, boolean strict, boolean substitutionInVariables)
      Constructor
    • Method Summary

      • Methods inherited from class io.dropwizard.configuration.EnvironmentVariableSubstitutor

        substitute
      • Methods inherited from class org.apache.commons.text.StringSubstitutor

        createInterpolator, getEscapeChar, getStringLookup, getValueDelimiterMatcher, getVariablePrefixMatcher, getVariableSuffixMatcher, isDisableSubstitutionInValues, isEnableSubstitutionInVariables, isEnableUndefinedVariableException, isPreserveEscapes, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceIn, replaceIn, replaceIn, replaceIn, replaceIn, replaceIn, replaceSystemProperties, resolveVariable, setDisableSubstitutionInValues, setEnableSubstitutionInVariables, setEnableUndefinedVariableException, setEscapeChar, setPreserveEscapes, setValueDelimiter, setValueDelimiter, setValueDelimiterMatcher, setVariablePrefix, setVariablePrefix, setVariablePrefixMatcher, setVariableResolver, setVariableSuffix, setVariableSuffix, setVariableSuffixMatcher
    • Constructor Detail

      • ConsulSubstitutor

        public ConsulSubstitutor​(com.orbitz.consul.Consul consul)
      • ConsulSubstitutor

        public ConsulSubstitutor​(com.orbitz.consul.Consul consul,
                                 boolean strict)
      • ConsulSubstitutor

        public ConsulSubstitutor​(com.orbitz.consul.Consul consul,
                                 boolean strict,
                                 boolean substitutionInVariables)
        Constructor
        Parameters:
        consul - Consul client
        strict - true if looking up undefined environment variables should throw a UndefinedEnvironmentVariableException, false otherwise.
        substitutionInVariables - a flag whether substitution is done in variable names.
        See Also:
        StringSubstitutor.setEnableSubstitutionInVariables(boolean)