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
@@ -2,51 +2,51 @@
let { libConfig, libLink } = require("@clusterio/lib");
class MasterConfigGroup extends libConfig.PluginConfigGroup {}
MasterConfigGroup.defaultAccess = ["master", "slave", "control"];
MasterConfigGroup.groupName = "player_auth";
MasterConfigGroup.define({
class ControllerConfigGroup extends libConfig.PluginConfigGroup {}
ControllerConfigGroup.defaultAccess = ["controller", "slave", "control"];
ControllerConfigGroup.groupName = "player_auth";
ControllerConfigGroup.define({
name: "code_length",
title: "Code Length",
description: "Length in characters of the generated codes.",
type: "number",
initial_value: 6,
});
MasterConfigGroup.define({
ControllerConfigGroup.define({
name: "code_timeout",
title: "Code Timeout",
description: "Time in seconds for the generated codes to stay valid.",
type: "number",
initial_value: 120,
});
MasterConfigGroup.finalize();
ControllerConfigGroup.finalize();
module.exports = {
name: "player_auth",
title: "Player Auth",
description: "Provides authentication to the cluster via logging into a Factorio server.",
masterEntrypoint: "master",
controllerEntrypoint: "controller",
instanceEntrypoint: "instance",
webEntrypoint: "./web",
MasterConfigGroup,
ControllerConfigGroup,
messages: {
fetchPlayerCode: new libLink.Request({
type: "player_auth:fetch_player_code",
links: ["instance-slave", "slave-master"],
forwardTo: "master",
links: ["instance-slave", "slave-controller"],
forwardTo: "controller",
requestProperties: {
"player": { type: "string" },
},
responseProperties: {
"player_code": { type: "string" },
"master_url": { type: "string" },
"controller_url": { type: "string" },
},
}),
setVerifyCode: new libLink.Request({
type: "player_auth:set_verify_code",
links: ["instance-slave", "slave-master"],
forwardTo: "master",
links: ["instance-slave", "slave-controller"],
forwardTo: "controller",
requestProperties: {
"player": { type: "string" },
"verify_code": { type: "string" },