PURISTA API / @purista/dapr-sdk / DaprConfigStore
Class: DaprConfigStore
Defined in: dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:16
DaprConfigStore is an adapter which connects to the config store provided by the underlaying Dapr infrastructure
Extends
Constructors
new DaprConfigStore()
new DaprConfigStore(
config
?):DaprConfigStore
Defined in: dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:19
Parameters
config?
cacheTtl?
number
Cache time to live in ms
clientConfig?
The Dapr client config to interact with Dapr sidecar
configStoreName?
string
The name of the config store
enableCache?
boolean
Enable cache
enableGet?
boolean
Enable generally get method
enableRemove?
boolean
Enable generally remove method
enableSet?
boolean
Enable generally set method
logger?
A logger instance
logLevel?
A log level for new logger if logger is not set
Returns
Overrides
ConfigStoreBaseClass
.constructor
Properties
cache
cache:
ConfigStoreCacheMap
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:20
Inherited from
config
config:
object
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:18
cacheTtl?
optional
cacheTtl:number
Cache time to live in ms
clientConfig?
optional
clientConfig:DaprClientConfig
The Dapr client config to interact with Dapr sidecar
configStoreName?
optional
configStoreName:string
The name of the config store
enableCache?
optional
enableCache:boolean
Enable cache
enableGet?
optional
enableGet:boolean
Enable generally get method
enableRemove?
optional
enableRemove:boolean
Enable generally remove method
enableSet?
optional
enableSet:boolean
Enable generally set method
logger?
optional
logger:Logger
A logger instance
logLevel?
optional
logLevel:LogLevelName
A log level for new logger if logger is not set
Inherited from
logger
logger:
Logger
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:17
Inherited from
name
name:
string
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:19
Inherited from
Methods
destroy()
destroy():
Promise
<void
>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:70
Returns
Promise
<void
>
Inherited from
getConfig()
getConfig<
ConfigNames
>(...configNames
):Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:37
Returns the values for given config properties. This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected getConfigImpl
Type Parameters
• ConfigNames extends string
[]
Parameters
configNames
...ConfigNames
Returns
Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
an object of
Inherited from
ConfigStoreBaseClass
.getConfig
getConfigImpl()
getConfigImpl<
ConfigNames
>(...configNames
):Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
Defined in: dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:54
This method must be overwritten by actual store implementation.
Type Parameters
• ConfigNames extends string
[]
Parameters
configNames
...ConfigNames
list of config items
Returns
Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
an object of
Overrides
ConfigStoreBaseClass
.getConfigImpl
removeConfig()
removeConfig(
configName
):Promise
<void
>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:52
Removes the config item given by config name. This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected removeConfigImpl
Parameters
configName
string
Returns
Promise
<void
>
Inherited from
ConfigStoreBaseClass
.removeConfig
removeConfigImpl()
removeConfigImpl(
_configName
):Promise
<void
>
Defined in: dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:84
This method must be overwritten by actual store implementation.
Parameters
_configName
string
Returns
Promise
<void
>
Overrides
ConfigStoreBaseClass
.removeConfigImpl
setConfig()
setConfig(
configName
,configValue
):Promise
<void
>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:69
Sets a config value This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected setConfigImpl
Parameters
configName
string
configValue
unknown
Returns
Promise
<void
>
Inherited from
ConfigStoreBaseClass
.setConfig
setConfigImpl()
setConfigImpl(
_configName
,_configValue
):Promise
<void
>
Defined in: dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:80
This method must be overwritten by actual store implementation.
Parameters
_configName
string
_configValue
unknown
Returns
Promise
<void
>