Refactor v1 API into server/v1.

This commit is contained in:
Ben Johnson
2013-10-10 22:42:45 -06:00
parent a8b677f6e7
commit a113a51d73
12 changed files with 331 additions and 317 deletions

View File

@ -0,0 +1,13 @@
package v1
func deleteKeyHandler(w http.ResponseWriter, req *http.Request, e *etcdServer) error {
key := req.URL.Path[len("/v1/keys/"):]
debugf("[recv] DELETE %v/v1/keys/%s [%s]", e.url, key, req.RemoteAddr)
command := &DeleteCommand{
Key: key,
}
return dispatchEtcdCommandV1(command, w, req)
}