etcd/mod/lock/renew_handler.go
2013-11-27 14:36:14 -07:00

17 lines
374 B
Go

package lock
import (
"net/http"
)
// renewLockHandler attempts to update the TTL on an existing lock.
// Returns a 200 OK if successful. Otherwie
func (h *handler) renewLockHandler(w http.ResponseWriter, req *http.Request) {
vars := mux.Vars(req)
key := path.Join(prefix, vars["key"])
ttl := vars["ttl"]
w.Write([]byte(fmt.Sprintf("%s-%s", key, ttl)))
// TODO:
}