http: add TODO for peers var

This commit is contained in:
Yicheng Qin 2014-09-09 15:51:28 -07:00
parent 961a61d708
commit d519491545
2 changed files with 4 additions and 2 deletions

View File

@ -147,7 +147,9 @@ func httpPost(url string, data []byte) bool {
type Handler struct {
Timeout time.Duration
Server *etcdserver.Server
Peers Peers
// TODO: dynamic configuration may make this outdated. take care of it.
// TODO: dynamic configuration may introduce race also.
Peers Peers
}
func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

View File

@ -70,7 +70,7 @@ func main() {
h := &etcdhttp.Handler{
Timeout: *timeout,
Server: s,
Peers: peers,
Peers: *peers,
}
http.Handle("/", h)
log.Fatal(http.ListenAndServe(*laddr, nil))