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

@@ -8,6 +8,7 @@ import (
)
type Options struct {
Addrs []string
Secure bool
TLSConfig *tls.Config
@@ -60,6 +61,13 @@ func newSubscribeOptions(opts ...SubscribeOption) SubscribeOptions {
return opt
}
// Addrs sets the host addresses to be used by the broker
func Addrs(addrs ...string) Option {
return func(o *Options) {
o.Addrs = addrs
}
}
// DisableAutoAck will disable auto acking of messages
// after they have been handled.
func DisableAutoAck() SubscribeOption {