diff options
Diffstat (limited to 'src/rhctl/playout_server.go')
-rw-r--r-- | src/rhctl/playout_server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go index a8cb399..325a3f6 100644 --- a/src/rhctl/playout_server.go +++ b/src/rhctl/playout_server.go @@ -62,6 +62,7 @@ type PlayoutServer struct { hbcnt uint state ServerState StateChanges chan ServerState + Commands chan Command UpdateRequest chan bool SwitchUpdates chan SwitchUpdate } @@ -108,7 +109,7 @@ func (srv *PlayoutServer) handleMessage(data string) { rhl.Printf("Server(%s) sent empty handover", srv.name) return } - // TODO: send command to swichctrl: &Command{Type: CmdServer, Args: data[9:], Response: nil} + srv.Commands <- Command{Type: CmdServer, Args: []string{data[9:]}, Response: nil} return } rhl.Printf("Server(%s): ignoring unknown message: %q", srv.name, data) @@ -164,6 +165,7 @@ func ServerInit(name string, conf *Config) (srv *PlayoutServer, err error) { srv.state.Health = ServerDead srv.state.Channel = "" srv.StateChanges = make(chan ServerState, 16) + srv.Commands = make(chan Command, 8) srv.UpdateRequest = make(chan bool, 8) srv.SwitchUpdates = make(chan SwitchUpdate, 32) |