@@ -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) {
@@ -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))