diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/http.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/http.go b/src/http.go index 16361c6..e522cb1 100644 --- a/src/http.go +++ b/src/http.go @@ -35,6 +35,15 @@ func setupHTTPServer() http.Server { r.HandleFunc("/editSelect", editSelectGetHandler).Methods("GET") r.HandleFunc("/api/getChallenges", getChallenges).Methods("GET") + // register a new companion container + r.HandleFunc("/api/register/newCompanion", newCompanion).Methods("POST") + + // Handle the companion container + r.HandleFunc("/api/companion/getChallenges", getChallenges).Methods("GET") + r.HandleFunc("/api/companion/stopContainer", stopContainer).Methods("POST") + r.HandleFunc("/api/companion/startContainer", startContainer).Methods("POST") + r.HandleFunc("/api/companion/getRunningContainers", getRunningContainers).Methods("GET") + return http.Server{ Addr: fmt.Sprintf("0.0.0.0:%d", *port), Handler: r, |