Skip to content

PURISTA API / Modules / @purista/dapr-sdk / DaprConfigStore

Class: DaprConfigStore

@purista/dapr-sdk.DaprConfigStore

DaprConfigStore is an adapter which connects to the config store provided by the underlaying Dapr infrastructure

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DaprConfigStore(config?): DaprConfigStore

Parameters

NameTypeDescription
config?Object-
config.cacheTtl?numberCache time to live in ms
config.clientConfig?DaprClientConfigThe Dapr client config to interact with Dapr sidecar
config.configStoreName?stringThe name of the config store
config.enableCache?booleanEnable cache
config.enableGet?booleanEnable generally get method
config.enableRemove?booleanEnable generally remove method
config.enableSet?booleanEnable generally set method
config.logLevel?LogLevelNameA log level for new logger if logger is not set
config.logger?LoggerA logger instance

Returns

DaprConfigStore

Overrides

ConfigStoreBaseClass.constructor

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:19

Properties

cache

cache: ConfigStoreCacheMap

Inherited from

ConfigStoreBaseClass.cache

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:20


client

Private client: HttpClient<DaprClientConfig>

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:17


config

config: Object

Type declaration

NameTypeDescription
cacheTtl?numberCache time to live in ms
clientConfig?DaprClientConfigThe Dapr client config to interact with Dapr sidecar
configStoreName?stringThe name of the config store
enableCache?booleanEnable cache
enableGet?booleanEnable generally get method
enableRemove?booleanEnable generally remove method
enableSet?booleanEnable generally set method
logLevel?LogLevelNameA log level for new logger if logger is not set
logger?LoggerA logger instance

Inherited from

ConfigStoreBaseClass.config

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:18


logger

logger: Logger

Inherited from

ConfigStoreBaseClass.logger

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:17


name

name: string

Inherited from

ConfigStoreBaseClass.name

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:19

Methods

destroy

destroy(): Promise<void>

Returns

Promise<void>

Inherited from

ConfigStoreBaseClass.destroy

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:70


getConfig

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

Returns the values for given config properties. This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected getConfigImpl

Type parameters

NameType
ConfigNamesextends string[]

Parameters

NameType
...configNamesConfigNames

Returns

Promise<ObjectWithKeysFromStringArray<ConfigNames>>

an object of

Inherited from

ConfigStoreBaseClass.getConfig

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:37


getConfigImpl

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

This method must be overwritten by actual store implementation.

Type parameters

NameType
ConfigNamesextends string[]

Parameters

NameTypeDescription
...configNamesConfigNameslist of config items

Returns

Promise<ObjectWithKeysFromStringArray<ConfigNames>>

an object of

Overrides

ConfigStoreBaseClass.getConfigImpl

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:54


removeConfig

removeConfig(configName): Promise<void>

Removes the config item given by config name. This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected removeConfigImpl

Parameters

NameType
configNamestring

Returns

Promise<void>

Inherited from

ConfigStoreBaseClass.removeConfig

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:52


removeConfigImpl

removeConfigImpl(_configName): Promise<void>

This method must be overwritten by actual store implementation.

Parameters

NameType
_configNamestring

Returns

Promise<void>

Overrides

ConfigStoreBaseClass.removeConfigImpl

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:84


setConfig

setConfig(configName, configValue): Promise<void>

Sets a config value This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected setConfigImpl

Parameters

NameType
configNamestring
configValueunknown

Returns

Promise<void>

Inherited from

ConfigStoreBaseClass.setConfig

Defined in

core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:69


setConfigImpl

setConfigImpl(_configName, _configValue): Promise<void>

This method must be overwritten by actual store implementation.

Parameters

NameType
_configNamestring
_configValueunknown

Returns

Promise<void>

Overrides

ConfigStoreBaseClass.setConfigImpl

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:80