func main() { batt.Init() platforms = flag.Args() go handler() for { // TODO(adg): backoff log.Println(connect(*serverAddr)) time.Sleep(10 * time.Second) } }
func main() { batt.Init() http.HandleFunc("/", home) http.HandleFunc("/accept", accept) http.HandleFunc("/build", build) log.Printf("Listening for worker connections on %s", *tcpListen) tln, err := net.Listen("tcp", *tcpListen) if err != nil { log.Fatalf("listen error: %v", err) } go acceptWorkers(tln) log.Printf("Listening for web requests on %s", *webListen) if err := http.ListenAndServe(*webListen, nil); err != nil { log.Fatalf("web listen: %v", err) } }