type BenchControllerConfig struct {
id int;
+ nclients int;
+ dbtype string;
+ dbhost string;
+ dbuser string;
+ dbpass string;
+ dbname string;
}
func CreateController()(contConfig *BenchControllerConfig)
time.Sleep(1000000000);
i := <-commInChan;
os.Stdout.WriteString("got a coms\n");
- commOutChan <- i;
- os.Stdout.WriteString("Send some back\n");
+
+ switch i {
+ case 1:
+ // this means shutdown
+ os.Stdout.WriteString("shutdown\n");
+ return;
+ case 2:
+ // get ready to bench - start the clients
+ os.Stdout.WriteString("ready clients\n");
+ case 3:
+ // start the clients
+ os.Stdout.WriteString("start clients\n");
+ }
}
}
\ No newline at end of file