pmcf 2.33.1 → 2.33.2
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
package/src/cluster.mjs
CHANGED
|
@@ -147,7 +147,7 @@ export class Cluster extends Host {
|
|
|
147
147
|
cfg.push(` protocol ${service.protocol.toUpperCase()}`);
|
|
148
148
|
|
|
149
149
|
for (const member of this.members) {
|
|
150
|
-
const memberService = member.findService({ type: service.type });
|
|
150
|
+
const memberService = member.findService({ type: service.type }) || member.host.findService({ type: service.type }); // TODO
|
|
151
151
|
|
|
152
152
|
cfg.push(` real_server ${member.address} ${memberService.port} {`);
|
|
153
153
|
cfg.push(` weight ${memberService.weight}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { writeLines, sectionLines } from "../utils.mjs";
|
|
3
|
-
import { NetworkAddress } from "pmcf";
|
|
3
|
+
import { NetworkAddress, Host } from "pmcf";
|
|
4
4
|
import { ServiceOwner } from "../service-owner.mjs";
|
|
5
5
|
import { cidrAddresses } from "../network-support.mjs";
|
|
6
6
|
|
|
@@ -29,7 +29,9 @@ export class SkeletonNetworkInterface extends ServiceOwner {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
get host() {
|
|
32
|
-
|
|
32
|
+
if(this.owner instanceof Host) {
|
|
33
|
+
return this.owner;
|
|
34
|
+
}
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
*hosts() {
|
|
@@ -331,7 +331,6 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
331
331
|
get gatewayAddress(): any;
|
|
332
332
|
set hostName(value: any);
|
|
333
333
|
get hostName(): any;
|
|
334
|
-
get domainNames(): any;
|
|
335
334
|
set scope(value: any);
|
|
336
335
|
get scope(): any;
|
|
337
336
|
set hwaddr(value: any);
|
|
@@ -4,6 +4,7 @@ export class SkeletonNetworkInterface extends ServiceOwner {
|
|
|
4
4
|
get typeName(): string;
|
|
5
5
|
set extends(value: any[]);
|
|
6
6
|
get extends(): any[];
|
|
7
|
+
get host(): Host;
|
|
7
8
|
hosts(): Generator<any, void, any>;
|
|
8
9
|
get network_interface(): this;
|
|
9
10
|
get domainNames(): Set<any>;
|
|
@@ -24,4 +25,5 @@ export class SkeletonNetworkInterface extends ServiceOwner {
|
|
|
24
25
|
systemdDefinitions(packageData: any): Promise<void>;
|
|
25
26
|
}
|
|
26
27
|
import { ServiceOwner } from "../service-owner.mjs";
|
|
28
|
+
import { Host } from "pmcf";
|
|
27
29
|
import { NetworkAddress } from "pmcf";
|