aboutsummaryrefslogtreecommitdiff
path: root/doc/server_selectors.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/server_selectors.md')
-rw-r--r--doc/server_selectors.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/server_selectors.md b/doc/server_selectors.md
new file mode 100644
index 0000000..ce4a4d5
--- /dev/null
+++ b/doc/server_selectors.md
@@ -0,0 +1,12 @@
+# Server selectors
+
+If needed, plugins can provide a custom function to choose the server to
+connect a new client to. To do this, call the [RegisterSrvSelector](https://pkg.go.dev/github.com/HimbeerserverDE/mt-multiserver-proxy#RegisterSrvSelector)
+function.
+
+Use the `SrvSelector` configuration option to choose one of the registered
+server selectors. This option is reloadable.
+
+If the configured server selector doesn't exist or doesn't return a server, the
+proxy uses the builtin server selection strategy. In the case where the
+configured server selector doesn't exist, a log message is generated.