Class: ConfigurationService<T, E>
Handle sessionSecret ( rolling between two secrets ) expire every hour Handle longTermSecret ( rolling between two longer secret ) expire every month
Load configuration from another service
If the result contains webda.services
in his object then webda configuration will
be dynamically reloaded
Webda Modda
Extends
Service
<T
,E
>
Type parameters
• T extends ConfigurationServiceParameters
= ConfigurationServiceParameters
• E extends ConfigurationEvents
= ConfigurationEvents
Constructors
new ConfigurationService(webda, name, params)
new ConfigurationService<
T
,E
>(webda
,name
,params
):ConfigurationService
<T
,E
>
Parameters
• webda: Core
<CoreEvents
>
The main instance of Webda
• name: string
The name of the service
• params: DeepPartial
<T
>= {}
The parameters block define in the configuration file
Returns
ConfigurationService
<T
, E
>
Inherited from
Source
packages/core/src/services/service.ts:334
Properties
_createException
_createException:
string
Inherited from
Source
packages/core/src/services/service.ts:315
_initException
_initException:
any
=undefined
Inherited from
Source
packages/core/src/services/service.ts:317
_initTime
_initTime:
number
Inherited from
Source
packages/core/src/services/service.ts:316
_name
protected
_name:string
Service name
Inherited from
Source
packages/core/src/services/service.ts:308
_webda
protected
_webda:Core
<CoreEvents
>
Webda Core object
Inherited from
Source
packages/core/src/services/service.ts:304
configuration
protected
configuration:any
Current configuration
Source
packages/core/src/services/configuration.ts:91
logger
protected
logger:Logger
Logger with class context
Inherited from
Source
packages/core/src/services/service.ts:321
metrics?
protected
metrics?:any
Get metrics
Inherited from
Source
packages/core/src/services/service.ts:325
nextCheck
protected
nextCheck:number
Source
packages/core/src/services/configuration.ts:71
parameters
protected
parameters:T
Hold the parameters for your service
It will be bring from the webda.config.json
Inherited from
Source
packages/core/src/services/service.ts:314
serializedConfiguration
protected
serializedConfiguration:any
Source
packages/core/src/services/configuration.ts:67
sourceId
protected
sourceId:string
Source id to retrieve
Source
packages/core/src/services/configuration.ts:79
sourceService
protected
sourceService:ConfigurationProvider
Service that will provide the information
Source
packages/core/src/services/configuration.ts:75
watchs
protected
watchs:any
[] =[]
Watchs for configuration update
Source
packages/core/src/services/configuration.ts:87
captureRejectionSymbol
static
readonly
captureRejectionSymbol: typeofcaptureRejectionSymbol
Inherited from
Service
.captureRejectionSymbol
Source
packages/core/node_modules/@types/node/events.d.ts:328
captureRejections
static
captureRejections:boolean
Sets or gets the default captureRejection value for all emitters.
Inherited from
Source
packages/core/node_modules/@types/node/events.d.ts:333
defaultMaxListeners
static
defaultMaxListeners:number
Inherited from
Source
packages/core/node_modules/@types/node/events.d.ts:334
errorMonitor
static
readonly
errorMonitor: typeoferrorMonitor
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Inherited from
Source
packages/core/node_modules/@types/node/events.d.ts:327
Methods
__clean()
__clean():
Promise
<void
>
Clean the service data, can only be used in test mode
Returns
Promise
<void
>
Inherited from
Abstract
Source
packages/core/src/services/service.ts:642
addListener()
addListener(
eventName
,listener
):this
Alias for emitter.on(eventName, listener)
.
Parameters
• eventName: string
| symbol
• listener: (...args
) => void
Returns
this