summaryrefslogtreecommitdiff
path: root/src/rhctl/switch_control.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-03-27 19:41:48 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-03-27 19:41:48 (GMT)
commit3b9dc5639b9b26bb5a8e4324de47f77a00e0e86a (patch)
treeaa70228a431945685a81ba711a72c8c6a3529e7a /src/rhctl/switch_control.go
parent6d2348f42b3e63109795c2d9578705d06b387cbb (diff)
added SwitchCTRL
Diffstat (limited to 'src/rhctl/switch_control.go')
-rw-r--r--src/rhctl/switch_control.go46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/rhctl/switch_control.go b/src/rhctl/switch_control.go
new file mode 100644
index 0000000..de5bf6d
--- /dev/null
+++ b/src/rhctl/switch_control.go
@@ -0,0 +1,46 @@
+//
+// rhctl
+//
+// Copyright (C) 2009-2016 Christian Pointner <equinox@helsinki.at>
+//
+// This file is part of rhctl.
+//
+// rhctl is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// any later version.
+//
+// rhctl is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with rhctl. If not, see <http://www.gnu.org/licenses/>.
+//
+
+package main
+
+import (
+ "time"
+)
+
+type SwitchControl struct {
+ sw *AudioSwitch
+ servers []*PlayoutServer
+}
+
+func (sw *SwitchControl) Run() {
+ rhdl.Printf("SwitchCTRL: handler running...")
+
+ for {
+ time.Sleep(time.Second)
+ }
+}
+
+func SwitchControlInit(conf *Config, sw *AudioSwitch, servers []*PlayoutServer) (ctrl *SwitchControl) {
+ ctrl = &SwitchControl{}
+ ctrl.sw = sw
+ ctrl.servers = servers
+ return
+}