Allow configurable addresses for everything

This commit is contained in:
Asim
2015-05-16 00:34:02 +01:00
parent c77be7c571
commit 0e7bd77f4c
13 changed files with 143 additions and 41 deletions

View File

@@ -25,6 +25,10 @@ type Subscriber interface {
Unsubscribe() error
}
type options struct{}
type Options func(*options)
var (
Address string
Id string
@@ -37,7 +41,7 @@ func Init() error {
}
if DefaultBroker == nil {
DefaultBroker = NewHttpBroker(Address)
DefaultBroker = NewHttpBroker([]string{Address})
}
return DefaultBroker.Init()