Module: SettingsReader::VaultResolver

Defined in:
lib/settings_reader/vault_resolver.rb,
lib/settings_reader/vault_resolver/cache.rb,
lib/settings_reader/vault_resolver/entry.rb,
lib/settings_reader/vault_resolver/address.rb,
lib/settings_reader/vault_resolver/logging.rb,
lib/settings_reader/vault_resolver/version.rb,
lib/settings_reader/vault_resolver/instance.rb,
lib/settings_reader/vault_resolver/refresher.rb,
lib/settings_reader/vault_resolver/engines/aws.rb,
lib/settings_reader/vault_resolver/engines/kv2.rb,
lib/settings_reader/vault_resolver/engines/auth.rb,
lib/settings_reader/vault_resolver/configuration.rb,
lib/settings_reader/vault_resolver/engines/abstract.rb,
lib/settings_reader/vault_resolver/engines/database.rb,
lib/settings_reader/vault_resolver/refresher_observer.rb,
lib/settings_reader/vault_resolver/helpers/vault_authentication.rb

Overview

Singleton for lease renewals and secrets cache

Defined Under Namespace

Modules: Engines, Helpers, Logging Classes: Address, Cache, Configuration, Entry, Error, Instance, Refresher, RefresherObserver

Constant Summary collapse

VERSION =
'0.5.0'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject (readonly)

Returns the value of attribute configuration.



26
27
28
# File 'lib/settings_reader/vault_resolver.rb', line 26

def configuration
  @configuration
end

.refresher_timer_taskObject (readonly)

Returns the value of attribute refresher_timer_task.



26
27
28
# File 'lib/settings_reader/vault_resolver.rb', line 26

def refresher_timer_task
  @refresher_timer_task
end

Class Method Details

.cacheObject



36
37
38
# File 'lib/settings_reader/vault_resolver.rb', line 36

def self.cache
  @cache ||= SettingsReader::VaultResolver::Cache.new
end

.configure(&block) ⇒ Object



29
30
31
32
33
34
# File 'lib/settings_reader/vault_resolver.rb', line 29

def self.configure(&block)
  @configuration = SettingsReader::VaultResolver::Configuration.new
  block&.call(@configuration)
  @configuration.vault_initializer.call
  @refresher_timer_task = @configuration.setup_lease_refresher(cache, refresher_timer_task)
end

.resolverObject

Raises:



40
41
42
43
44
# File 'lib/settings_reader/vault_resolver.rb', line 40

def self.resolver
  raise Error, 'Gem not configured. Call configure before getting resolver' unless configuration

  SettingsReader::VaultResolver::Instance.new(configuration)
end