Class: ConfigOMat::SecretsLoader::Memory

Inherits:
LifecycleVM::Memory
  • Object
show all
Defined in:
lib/config_o_mat/secrets_loader/memory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(secretsmanager_client: nil, secret_defs_to_load: [], secrets_cache: {}, loading_secret: nil, logger: nil) ⇒ Memory

Returns a new instance of Memory.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 26

def initialize(
  secretsmanager_client: nil,
  secret_defs_to_load: [],
  secrets_cache: {},
  loading_secret: nil,
  logger: nil
)
  @secretsmanager_client = secretsmanager_client
  @secret_defs_to_load = secret_defs_to_load
  @secrets_cache = secrets_cache
  @loading_secret = loading_secret
  @loaded_secrets = {}
  @logger = logger
end

Instance Attribute Details

#loaded_secretsObject

Returns the value of attribute loaded_secrets.



24
25
26
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 24

def loaded_secrets
  @loaded_secrets
end

#loading_secretObject

Returns the value of attribute loading_secret.



24
25
26
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 24

def loading_secret
  @loading_secret
end

#secret_defs_to_loadObject

Returns the value of attribute secret_defs_to_load.



24
25
26
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 24

def secret_defs_to_load
  @secret_defs_to_load
end

#secrets_cacheObject

Returns the value of attribute secrets_cache.



24
25
26
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 24

def secrets_cache
  @secrets_cache
end

#secretsmanager_clientObject (readonly)

Returns the value of attribute secretsmanager_client.



22
23
24
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 22

def secretsmanager_client
  @secretsmanager_client
end

Instance Method Details

#update_secret_defs_to_load(defs) ⇒ Object



41
42
43
44
45
# File 'lib/config_o_mat/secrets_loader/memory.rb', line 41

def update_secret_defs_to_load(defs)
  @loaded_secrets = {}
  @secret_defs_to_load = defs
  self
end