pmcf 1.90.0 → 1.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.90.0",
3
+ "version": "1.91.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/cluster.mjs CHANGED
@@ -14,7 +14,8 @@ const ClusterTypeDefinition = {
14
14
  routerId: { type: "number", collection: false, writeable: true },
15
15
  masters: { type: "network_interface", collection: true, writeable: true },
16
16
  backups: { type: "network_interface", collection: true, writeable: true },
17
- members: { type: "network_interface", collection: true, writeable: false }
17
+ members: { type: "network_interface", collection: true, writeable: false },
18
+ checkInterval: { type: "number", collection: false, writeable: true }
18
19
  }
19
20
  };
20
21
 
@@ -22,6 +23,7 @@ export class Cluster extends Host {
22
23
  #masters = new Set();
23
24
  #backups = new Set();
24
25
  routerId = 100;
26
+ checkInterval = 60;
25
27
 
26
28
  static {
27
29
  addType(this);
@@ -105,7 +107,9 @@ export class Cluster extends Host {
105
107
  );
106
108
  cfg.push(" }");
107
109
  cfg.push(` virtual_router_id ${cluster.routerId}`);
108
- cfg.push(` priority ${host.priority - (cluster.masters.has(ni) ? 0 : 5)}`);
110
+ cfg.push(
111
+ ` priority ${host.priority - (cluster.masters.has(ni) ? 0 : 5)}`
112
+ );
109
113
  cfg.push(" smtp_alert");
110
114
  cfg.push(" advert_int 5");
111
115
  cfg.push(" authentication {");
@@ -128,7 +132,7 @@ export class Cluster extends Host {
128
132
 
129
133
  for (const service of cluster.findServices({ type: "http|dns|smtp" })) {
130
134
  cfg.push(`virtual_server ${cluster.rawAddress} ${service.port} {`);
131
- cfg.push(" delay_loop 10");
135
+ cfg.push(` delay_loop ${cluster.checkInterval}`);
132
136
  cfg.push(" lb_algo wlc");
133
137
  cfg.push(" persistence_timeout 600");
134
138
  cfg.push(` protocol ${service.protocol.toUpperCase()}`);
@@ -416,9 +416,15 @@ export class Cluster extends Host {
416
416
  collection: boolean;
417
417
  writeable: boolean;
418
418
  };
419
+ checkInterval: {
420
+ type: string;
421
+ collection: boolean;
422
+ writeable: boolean;
423
+ };
419
424
  };
420
425
  };
421
426
  routerId: number;
427
+ checkInterval: number;
422
428
  set masters(value: Set<any>);
423
429
  get masters(): Set<any>;
424
430
  set backups(value: Set<any>);