Skip to main content

Class: DaprConfigStore


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<DaprConfigStoreConfig>.constructor

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:17open in new window

Properties

client

Private client: HttpClient<DaprClientConfig>

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:15open in new window


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/lib/types/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:10


logger

logger: Logger

Inherited from

ConfigStoreBaseClass.logger

Defined in

core/lib/types/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:9


name

name: string

Inherited from

ConfigStoreBaseClass.name

Defined in

core/lib/types/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:11

Methods

destroy

destroy(): Promise<void>

Returns

Promise<void>

Inherited from

ConfigStoreBaseClass.destroy

Defined in

core/lib/types/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:16


getConfig

getConfig(...configNames): Promise<Record<string, unknown>>

Parameters

NameType
...configNamesstring[]

Returns

Promise<Record<string, unknown>>

Overrides

ConfigStoreBaseClass.getConfig

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:52open in new window


removeConfig

removeConfig(_configName): Promise<void>

Parameters

NameType
_configNamestring

Returns

Promise<void>

Overrides

ConfigStoreBaseClass.removeConfig

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:88open in new window


setConfig

setConfig(_configName, _configValue): Promise<void>

Parameters

NameType
_configNamestring
_configValueunknown

Returns

Promise<void>

Overrides

ConfigStoreBaseClass.setConfig

Defined in

dapr-sdk/src/DaprConfigStore/DaprConfigStore.impl.ts:80open in new window

Last update:
Contributors: Sebastian Wessel