summaryrefslogtreecommitdiff
path: root/cmd/dolmetschctl
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dolmetschctl')
-rw-r--r--cmd/dolmetschctl/dolmetschctl.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/dolmetschctl/dolmetschctl.go b/cmd/dolmetschctl/dolmetschctl.go
index 6055896..a1598bc 100644
--- a/cmd/dolmetschctl/dolmetschctl.go
+++ b/cmd/dolmetschctl/dolmetschctl.go
@@ -25,7 +25,6 @@ package main
import (
"log"
"os"
- "time"
"spreadspace.org/dolmetschctl/pkg/controller"
)
@@ -47,8 +46,12 @@ func main() {
log.Printf("controller successfully initialized!")
+ ch := make(chan controller.Event, 100)
+ c.Subscribe(ch)
for {
- time.Sleep(1 * time.Second)
+ ev := <-ch
+ log.Printf("got controller event: %v", ev)
}
+
log.Printf("exiting.")
}