UNPKG

@joergmittaglawo/dmvconfig

Version:

DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.

63 lines 1.91 kB
"use strict"; /** * Finds and loads the Nodes Configuration * @packageDocumentation * * @version 0.0.0-alpha.0 * @date 2020-04-15 * @author Mittag, Jörg (Lawo) <joerg.mittag@lawo.com> * @license SPDX-License-Identifier: MIT */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NODES_CONF = void 0; /** * The current configuration directory */ const current_conf_dir_1 = __importDefault(require("../current_conf_dir")); /** * The Cluster configuration */ const cluster_1 = __importDefault(require("./cluster")); /** * The Nodes configuration */ exports.NODES_CONF = require(`${current_conf_dir_1.default}/nodes`); /** * The interfaces */ const { communication: { scriptInterface: SCRIPT_IFACE, clusterInterface: CLUSTER_IFACE } } = cluster_1.default; exports.NODES_CONF.forEach((node) => { switch (SCRIPT_IFACE) { case 'front': node.scriptIp = node.interfaces.management.front.ip; break; case 'back': node.scriptIp = node.interfaces.management.back.ip; break; case 'P1': node.scriptIp = node.interfaces.media.p1.ip; break; case 'P2': node.scriptIp = node.interfaces.media.p2.ip; break; } switch (CLUSTER_IFACE) { case 'front': node.clusterIp = node.interfaces.management.front.ip; break; case 'back': node.clusterIp = node.interfaces.management.back.ip; break; case 'P1': node.clusterIp = node.interfaces.media.p1.ip; break; case 'P2': node.clusterIp = node.interfaces.media.p2.ip; break; } }); exports.default = exports.NODES_CONF; //# sourceMappingURL=nodes.js.map