refactor(watcher) change newWatcher to Watch

This commit is contained in:
Xiang Li
2014-01-09 13:29:04 +08:00
parent bbbf8fd574
commit fa3b4a7941
7 changed files with 34 additions and 23 deletions

View File

@@ -25,7 +25,7 @@ func WatchKeyHandler(w http.ResponseWriter, req *http.Request, s Server) error {
}
// Start the watcher on the store.
watcher, err := s.Store().NewWatcher(key, false, sinceIndex)
watcher, err := s.Store().Watch(key, false, sinceIndex)
if err != nil {
return etcdErr.NewError(500, key, s.Store().Index())
}