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
ConfigStoreBaseClass
<DaprConfigStoreConfig
>↳
DaprConfigStore
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new DaprConfigStore(config?
): DaprConfigStore
Parameters
Name | Type | Description |
---|---|---|
config? | Object | - |
config.cacheTtl? | number | Cache time to live in ms |
config.clientConfig? | DaprClientConfig | The Dapr client config to interact with Dapr sidecar |
config.configStoreName? | string | The name of the config store |
config.enableCache? | boolean | Enable cache |
config.enableGet? | boolean | Enable generally get method |
config.enableRemove? | boolean | Enable generally remove method |
config.enableSet? | boolean | Enable generally set method |
config.logLevel? | LogLevelName | A log level for new logger if logger is not set |
config.logger? | Logger | A logger instance |
Returns
Overrides
ConfigStoreBaseClass.constructor
Defined in
dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:19
Properties
cache
• cache: ConfigStoreCacheMap
Inherited from
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
Name | Type | Description |
---|---|---|
cacheTtl? | number | Cache time to live in ms |
clientConfig? | DaprClientConfig | 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 |
logLevel? | LogLevelName | A log level for new logger if logger is not set |
logger? | Logger | A logger instance |
Inherited from
Defined in
core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:18
logger
• logger: Logger
Inherited from
Defined in
core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:17
name
• name: string
Inherited from
Defined in
core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:19
Methods
destroy
▸ destroy(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
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
Name | Type |
---|---|
ConfigNames | extends string [] |
Parameters
Name | Type |
---|---|
...configNames | ConfigNames |
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
Name | Type |
---|---|
ConfigNames | extends string [] |
Parameters
Name | Type | Description |
---|---|---|
...configNames | ConfigNames | list 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
Name | Type |
---|---|
configName | string |
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
Name | Type |
---|---|
_configName | string |
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
Name | Type |
---|---|
configName | string |
configValue | unknown |
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
Name | Type |
---|---|
_configName | string |
_configValue | unknown |
Returns
Promise
<void
>
Overrides
ConfigStoreBaseClass.setConfigImpl