middleware/etcd: Use the correct endpoint

The endpoint for etcd as wrongly set if a proxy was configured.
Clean up some documentation in the process as well.
This commit is contained in:
Miek Gieben
2016-04-19 12:52:05 +00:00
parent 913cffd4a8
commit a1e6cb7cf4
9 changed files with 8 additions and 24 deletions

View File

@@ -17,7 +17,7 @@ import (
"golang.org/x/net/context"
)
const defaultEndpoint = "http://127.0.0.1:2379"
const defaultEndpoint = "http://localhost:2379"
// Etcd sets up the etcd middleware.
func Etcd(c *Controller) (middleware.Middleware, error) {
@@ -125,7 +125,6 @@ func etcdParse(c *Controller) (etcd.Etcd, bool, error) {
args[i] = h + ":53"
}
}
endpoints = args
etc.Proxy = proxy.New(args)
case "tls": // cert key cacertfile
args := c.RemainingArgs()