X-Git-Url: http://git.pjr.cc/?p=goDBhammer.git;a=blobdiff_plain;f=src%2Fbenchcontroller.go;h=4d68235882a6b34e249d82065d458af605e767fb;hp=21150e1f459ca0236bfd9ba30f707c33f2f297a2;hb=deb9dc585d6bb170f01e98db00ad6ea70f0b4ef7;hpb=947aefe43247ed8a2331ccc951dc4763008a151a diff --git a/src/benchcontroller.go b/src/benchcontroller.go index 21150e1..4d68235 100644 --- a/src/benchcontroller.go +++ b/src/benchcontroller.go @@ -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;