Broker init

This commit is contained in:
Asim
2016-03-15 22:12:28 +00:00
parent fe4362be5a
commit 64220dc0c5
7 changed files with 21 additions and 13 deletions

View File

@@ -92,7 +92,7 @@ func newTransport(config *tls.Config) *http.Transport {
return t
}
func newHttpBroker(addrs []string, opts ...Option) Broker {
func newHttpBroker(opts ...Option) Broker {
options := Options{
Context: context.TODO(),
}
@@ -102,8 +102,8 @@ func newHttpBroker(addrs []string, opts ...Option) Broker {
}
addr := ":0"
if len(addrs) > 0 && len(addrs[0]) > 0 {
addr = addrs[0]
if len(options.Addrs) > 0 && len(options.Addrs[0]) > 0 {
addr = options.Addrs[0]
}
reg, ok := options.Context.Value(registryKey).(registry.Registry)