Add load balancing support to services.

This commit is contained in:
Brendan Burns
2014-06-17 10:50:42 -07:00
parent 23e736c8e1
commit 2759b2367f
351 changed files with 318 additions and 370 deletions

View File

@@ -189,8 +189,12 @@ func (server *ApiServer) handleREST(parts []string, requestUrl *url.URL, req *ht
server.error(err, w)
return
}
storage.Create(obj)
server.write(200, obj, w)
err = storage.Create(obj)
if err != nil {
server.error(err, w)
} else {
server.write(200, obj, w)
}
return
case "DELETE":
if len(parts) != 2 {