pmcf 1.50.1 → 1.51.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 +1 -1
- package/src/cluster.mjs +14 -3
- package/types/cluster.d.mts +14 -1
package/package.json
CHANGED
package/src/cluster.mjs
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { Owner } from "./owner.mjs";
|
|
2
2
|
import { addType } from "./types.mjs";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const ClusterTypeDefinition = {
|
|
5
5
|
name: "cluster",
|
|
6
6
|
owners: [Owner.typeDefinition, "network", "root"],
|
|
7
7
|
priority: 0.7,
|
|
8
8
|
extends: Owner.typeDefinition,
|
|
9
|
-
properties: {
|
|
9
|
+
properties: {
|
|
10
|
+
masters: { type: "host", collection: true, writeable: true },
|
|
11
|
+
backups: { type: "host", collection: true, writeable: true },
|
|
12
|
+
}
|
|
10
13
|
};
|
|
11
14
|
|
|
12
15
|
export class Cluster extends Owner {
|
|
16
|
+
|
|
17
|
+
masters = new Set();
|
|
18
|
+
backups = new Set();
|
|
19
|
+
|
|
13
20
|
static {
|
|
14
21
|
addType(this);
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
static get typeDefinition() {
|
|
18
|
-
return
|
|
25
|
+
return ClusterTypeDefinition;
|
|
19
26
|
}
|
|
20
27
|
|
|
28
|
+
constructor(owner, data) {
|
|
29
|
+
super(owner, data);
|
|
30
|
+
this.read(data, ClusterTypeDefinition);
|
|
31
|
+
}
|
|
21
32
|
}
|
package/types/cluster.d.mts
CHANGED
|
@@ -308,7 +308,20 @@ export class Cluster extends Owner {
|
|
|
308
308
|
};
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
|
-
properties: {
|
|
311
|
+
properties: {
|
|
312
|
+
masters: {
|
|
313
|
+
type: string;
|
|
314
|
+
collection: boolean;
|
|
315
|
+
writeable: boolean;
|
|
316
|
+
};
|
|
317
|
+
backups: {
|
|
318
|
+
type: string;
|
|
319
|
+
collection: boolean;
|
|
320
|
+
writeable: boolean;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
312
323
|
};
|
|
324
|
+
masters: Set<any>;
|
|
325
|
+
backups: Set<any>;
|
|
313
326
|
}
|
|
314
327
|
import { Owner } from "./owner.mjs";
|