Rename Master to Controller

The role of the master server as the party controlling every part of the
cluster is not well reflected in its name and has caused confusion among
users on several occasions.  Rename master to controller to better
reflects its role.
This commit is contained in:
Hornwitser committed 2023-02-22 15:30:51 +01:00
1 parent 6ae4c8ef46
commit 70ad295a89
119 files changed
+1394 -1376

No files matched your search

+13 -13
View File
@@ -19,8 +19,8 @@ describe("lib/plugin", function() {
await instancePlugin.onStop();
instancePlugin.onExit();
await instancePlugin.onOutput({});
instancePlugin.onMasterConnectionEvent("connect");
await instancePlugin.onPrepareMasterDisconnect();
instancePlugin.onControllerConnectionEvent("connect");
await instancePlugin.onPrepareControllerDisconnect();
});
describe("sendRcon", function() {
it("should send commands out of order", async function() {
@@ -54,20 +54,20 @@ describe("lib/plugin", function() {
});
});
describe("class BaseMasterPlugin", function() {
let masterPlugin;
describe("class BaseControllerPlugin", function() {
let controllerPlugin;
it("should be constructible", async function() {
masterPlugin = new libPlugin.BaseMasterPlugin({}, {}, {}, new mock.MockLogger());
await masterPlugin.init();
controllerPlugin = new libPlugin.BaseControllerPlugin({}, {}, {}, new mock.MockLogger());
await controllerPlugin.init();
});
it("should define defaults for hooks", async function() {
await masterPlugin.onInstanceStatusChanged({}, "running", "initialized");
await masterPlugin.onMasterConfigFieldChanged({}, "foo", null);
await masterPlugin.onInstanceConfigFieldChanged({}, {}, "foo", null);
await masterPlugin.onMetrics();
await masterPlugin.onShutdown();
masterPlugin.onSlaveConnectionEvent({}, "connect");
await masterPlugin.onPrepareSlaveDisconnect({});
await controllerPlugin.onInstanceStatusChanged({}, "running", "initialized");
await controllerPlugin.onControllerConfigFieldChanged({}, "foo", null);
await controllerPlugin.onInstanceConfigFieldChanged({}, {}, "foo", null);
await controllerPlugin.onMetrics();
await controllerPlugin.onShutdown();
controllerPlugin.onSlaveConnectionEvent({}, "connect");
await controllerPlugin.onPrepareSlaveDisconnect({});
});
});