aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/config.go b/config.go
index 1401686..4fe9851 100644
--- a/config.go
+++ b/config.go
@@ -87,7 +87,12 @@ func Conf() Config {
return config
}
-// AddServer appends a server to the list of configured servers.
+// AddServer dynamically configures a new Server at runtime.
+// Servers added in this way are ephemeral and will be lost
+// when the proxy shuts down.
+// For the media to work you have to specify an alternative
+// media source that is always available, even if the server
+// is offline.
func AddServer(server Server) bool {
configMu.Lock()
defer configMu.Unlock()
@@ -102,7 +107,9 @@ func AddServer(server Server) bool {
return true
}
-// RmServer removes a server based on name.
+// RmServer deletes a Server from the Config at runtime.
+// Any server can be deleted this way, not just the ones
+// added using AddServer.
func RmServer(name string) bool {
configMu.Lock()
defer configMu.Unlock()