Classes · @purista/core

ConfigStoreBaseClass

Base class for config store adapters.

Signature

ConfigStoreBaseClass.tstypescript
class ConfigStoreBaseClass<ConfigStoreConfigType>

Constructors

1 entry

constructor

Constructor

Source
constructor.tstypescript
new constructor<ConfigStoreConfigType>(name: string, config: mapped)

Properties

4 entries

cache

Property

Source
cache.tstypescript
cache: ConfigStoreCacheMap

Optional local cache used by store implementations that opt in.

config

Property

Source
config.tstypescript
config: mapped

Store configuration including operation toggles and cache settings.

logger

Property

Source
logger.tstypescript
logger: Logger

Child logger scoped to the store name.

name

Property

Source
name.tstypescript
name: string

Store name used in logs and diagnostics.

Methods

7 entries

destroy

Method

Source
destroy.tstypescript
destroy(): Promise<void>

Shutdown hook for store adapters.

getConfig

Method

Source
getConfig.tstypescript
getConfig<ConfigNames>(...configNames: ConfigNames): Promise<ObjectWithKeysFromStringArray<ConfigNames>>

Returns the values for given config properties.

getConfigImpl

Method

Source
getConfigImpl.tstypescript
getConfigImpl<ConfigNames>(...configNames: ConfigNames): Promise<ObjectWithKeysFromStringArray<ConfigNames>>

This method must be overwritten by actual store implementation.

removeConfig

Method

Source
removeConfig.tstypescript
removeConfig(configName: string): Promise<void>

Removes the config item given by config name.

removeConfigImpl

Method

Source
removeConfigImpl.tstypescript
removeConfigImpl(configName: string): Promise<void>

This method must be overwritten by actual store implementation.

setConfig

Method

Source
setConfig.tstypescript
setConfig(configName: string, configValue: unknown): Promise<void>

Sets a config value.

setConfigImpl

Method

Source
setConfigImpl.tstypescript
setConfigImpl(_configName: string, _configValue: unknown): Promise<void>

This method must be overwritten by actual store implementation.