Implement weave consense

This commit is contained in:
Adam Harrison committed 2016-03-03 18:52:09 +00:00
1 parent 7c65b6e3bb
commit 6584df274e
5 files changed
+59

No files matched your search

+4
View File
@@ -82,6 +82,10 @@ func (alloc *Allocator) HandleHTTP(router *mux.Router, defaultSubnet address.CID
}
})
router.Methods("GET").Path("/consensus").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
alloc.Consense()
})
router.Methods("GET").Path("/ip/{id}/{ip}/{prefixlen}").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
if subnet, ok := parseCIDR(w, vars["ip"]+"/"+vars["prefixlen"], true); ok {