class ContainerConfig::Provider::Base

Base config value provider

Public Instance Methods

load(key, *_dig_keys, **options) click to toggle source

Loads a configuration setting from the provider

@param [String] key Configuration key to load @param [Array] _dig_keys Variable keys to use to load from providers that accept a dig structure

defaults to the lowercase key split by underscores
"MY_PASSWORD" => ["my", "password"]

@param [Hash] options Options Hash @option options [String] :default default value if the configuration setting cannot be found @option options [String] :secret_mount_directory directory where secret files are mounted

@return [Object] configuration setting value

# File lib/container_config/provider/base.rb, line 31
def load(key, *_dig_keys, **options)
  ContainerConfig.logger.debug do
    "Loading configuration value for #{key} with options #{options} from #{self.class}"
  end
  nil
end
name() click to toggle source

Returns name of the config value provider

@return [String] provider name

# File lib/container_config/provider/base.rb, line 14
def name
  raise ContainerConfig::MissingOverride, "Must override name method in derived class #{self.class}"
end