diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-16 18:21:17 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-16 18:21:17 +0200 |
commit | f496d66d1d955b16ca2e1a8089cce8e71f6f3bda (patch) | |
tree | a502475a86a9e9dd1ebfcb01f0f4f2b57cd2c416 | |
parent | 43b3d28f4ecb016023b994dd28f796cb7921551b (diff) |
document dynamic servers
closes #123
-rw-r--r-- | doc/dynamic_servers.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/dynamic_servers.md b/doc/dynamic_servers.md new file mode 100644 index 0000000..459c8da --- /dev/null +++ b/doc/dynamic_servers.md @@ -0,0 +1,29 @@ +# Dynamic servers + +## About +While servers are traditionally defined in the config +plugins have the ability to add new servers at runtime. +Dynamic servers can be deleted when they are no longer needed +and no players are connected to them. Statically defined servers +cannot be removed at runtime. Dynamic servers must be +part of a media pool that has at least one static member. +They are lost when the proxy restarts. + +This feature can be useful to implement things like starting +minigame servers as needed. + +## Adding servers at runtime +A plugin may call [AddServer](https://pkg.go.dev/github.com/HimbeerserverDE/mt-multiserver-proxy#AddServer) to dynamically create a server at any time. +It returns a boolean indicating success. + +### Conditions +* Server name is not taken +* Media pool contains at least one static member + +## Removing servers at runtime +A plugin may call [RmServer](https://pkg.go.dev/github.com/HimbeerserverDE/mt-multiserver-proxy#RmServer) to dynamically delete a dynamic server at any time. +It returns a boolean indicating success or an already inexistent server. + +### Conditions +* Server was dynamically added +* No player connections |