refactor(server): move utilities into pkg

like camlistore lets move these utilities into a `pkg` prefix.
This commit is contained in:
Brandon Philips
2014-01-27 15:00:10 -08:00
parent 0e50d9787a
commit 69922340f6
3 changed files with 9 additions and 18 deletions

View File

@@ -15,6 +15,7 @@ import (
"github.com/coreos/etcd/log"
"github.com/coreos/etcd/metrics"
"github.com/coreos/etcd/mod"
uhttp "github.com/coreos/etcd/pkg/http"
"github.com/coreos/etcd/server/v1"
"github.com/coreos/etcd/server/v2"
"github.com/coreos/etcd/store"
@@ -244,7 +245,7 @@ func (s *Server) Dispatch(c raft.Command, w http.ResponseWriter, req *http.Reque
default:
url, _ = ps.registry.ClientURL(leader)
}
redirect(url, w, req)
uhttp.Redirect(url, w, req)
return nil
}
@@ -295,7 +296,7 @@ func (s *Server) GetLeaderStatsHandler(w http.ResponseWriter, req *http.Request)
return etcdErr.NewError(300, "", s.Store().Index())
}
hostname, _ := s.registry.ClientURL(leader)
redirect(hostname, w, req)
uhttp.Redirect(hostname, w, req)
return nil
}