revert variable names

Signed-off-by: Alexandre Beslic <abronan@docker.com>
This commit is contained in:
Alexandre Beslic 2015-05-12 14:47:48 -07:00
parent 6b0b82cddc
commit 06f51e09b0
4 changed files with 6 additions and 6 deletions

View File

@ -125,7 +125,7 @@ func manage(c *cli.Context) {
log.Fatal("--heartbeat should be an unsigned integer and greater than 0")
}
options := &cluster.Options{
TLS: tlsConfig,
TLSConfig: tlsConfig,
OvercommitRatio: c.Float64("overcommit"),
Discovery: dflag,
Heartbeat: hb,

View File

@ -4,7 +4,7 @@ import "crypto/tls"
// Options is exported
type Options struct {
TLS *tls.Config
TLSConfig *tls.Config
OvercommitRatio float64
Discovery string
Heartbeat uint64

View File

@ -138,7 +138,7 @@ func (c *Cluster) newEntries(entries []*discovery.Entry) {
go func(m *discovery.Entry) {
if !c.hasEngine(m.String()) {
engine := cluster.NewEngine(m.String(), c.options.OvercommitRatio)
if err := engine.Connect(c.options.TLS); err != nil {
if err := engine.Connect(c.options.TLSConfig); err != nil {
log.Error(err)
return
}

View File

@ -54,16 +54,16 @@ func (s *Discovery) Fetch() ([]*discovery.Entry, error) {
defer resp.Body.Close()
var entries []string
var addrs []string
if resp.StatusCode == http.StatusOK {
if err := json.NewDecoder(resp.Body).Decode(&entries); err != nil {
if err := json.NewDecoder(resp.Body).Decode(&addrs); err != nil {
return nil, err
}
} else {
return nil, fmt.Errorf("Failed to fetch entries, Discovery service returned %d HTTP status code", resp.StatusCode)
}
return discovery.CreateEntries(entries)
return discovery.CreateEntries(addrs)
}
// Watch is exported