Skip to main content

ClusterServiceParameters

@webda/core


Class: ClusterServiceParameters

Defined in: packages/core/src/services/cluster.service.ts:41

ClusterService parameters

Extends​

Extended by​

Constructors​

Constructor​

new ClusterServiceParameters(): ClusterServiceParameters

Returns​

ClusterServiceParameters

Inherited from​

ServiceParameters.constructor

Properties​

instanceId?​

optional instanceId?: string

Defined in: packages/core/src/services/cluster.service.ts:55

Identity of this instance, unique per process: defaults to <HOSTNAME or hostname()>-<pid>-<random>


leaseDuration​

leaseDuration: number

Defined in: packages/core/src/services/cluster.service.ts:46

Milliseconds a lease is valid without renewal

Default​

15000

leaseName​

leaseName: string

Defined in: packages/core/src/services/cluster.service.ts:60

Name of the lease

Default​

"leader"

renewInterval​

renewInterval: number

Defined in: packages/core/src/services/cluster.service.ts:51

Milliseconds between two attempts to acquire or renew the lease, lower than leaseDuration

Default​

5000

type​

type: string

Defined in: packages/core/src/services/serviceparameters.ts:10

Type of the service

Inherited from​

ServiceParameters.type

Methods​

load()​

load(params?): this

Defined in: packages/core/src/services/cluster.service.ts:67

Load operation

Parameters​

params?​

any = {}

raw parameters

Returns​

this

this

Overrides​

ServiceParameters.load


update()​

update(params?, delta): this

Defined in: packages/core/src/application/parameters.ts:33

Update parameters and call watchers if a parameter was changed

Parameters​

params?​

any = {}

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

ServiceParameters.update


with()​

with(callback): this

Defined in: packages/core/src/application/parameters.ts:63

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

ServiceParameters.with