Registry init

This commit is contained in:
Asim
2016-03-15 22:20:21 +00:00
parent 64220dc0c5
commit f088074f29
6 changed files with 28 additions and 20 deletions

View File

@@ -110,7 +110,7 @@ var (
"http": broker.NewBroker,
}
DefaultRegistries = map[string]func([]string, ...registry.Option) registry.Registry{
DefaultRegistries = map[string]func(...registry.Option) registry.Registry{
"consul": registry.NewRegistry,
}
@@ -216,7 +216,7 @@ func (c *cmd) Before(ctx *cli.Context) error {
}
if r, ok := c.opts.Registries[name]; ok {
n := r(strings.Split(ctx.String("registry_address"), ","))
n := r(registry.Addrs(strings.Split(ctx.String("registry_address"), ",")...))
*c.opts.Registry = n
} else {
return fmt.Errorf("Registry %s not found", name)