the ugliest code on earth...
[goDBhammer.git] / src / benchcontroller.go
index 21150e1..4d68235 100644 (file)
@@ -28,8 +28,31 @@ func CreateController()(contConfig *BenchControllerConfig)
        return bcConfig;
 }
 
-func MainLoop(conf *BenchControllerConfig, commInChan chan string, commOutChan chan string)
+func buildStatus(commOutStatus chan string, commInGoro chan string)
 {
+       var statusBuffer string;
+       
+       statusBuffer = "none:none";
+       
+       for {
+               select {
+                       case invar := <- commInGoro:
+                               fmt.Printf("received a status update\n");
+                               statusBuffer = invar;
+                       case commOutStatus <- statusBuffer:
+                               fmt.Printf("send a status buffer\n");
+                               
+               }
+       }
+}
+
+func MainLoop(conf *BenchControllerConfig, commInChan chan string, commOutChan chan string, commOutStatus chan string)
+{
+       
+       comInGo := make(chan string);
+       
+       go buildStatus(commOutStatus, comInGo);
+       
        for {
                i := <-commInChan;