add advertising option
This commit is contained in:
@@ -13,6 +13,7 @@ type options struct {
|
||||
metadata map[string]string
|
||||
name string
|
||||
address string
|
||||
advertise string
|
||||
id string
|
||||
version string
|
||||
}
|
||||
@@ -71,6 +72,10 @@ func (o options) Address() string {
|
||||
return o.address
|
||||
}
|
||||
|
||||
func (o options) Advertise() string {
|
||||
return o.advertise
|
||||
}
|
||||
|
||||
func (o options) Metadata() map[string]string {
|
||||
return o.metadata
|
||||
}
|
||||
@@ -99,6 +104,12 @@ func Address(a string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func Advertise(a string) Option {
|
||||
return func(o *options) {
|
||||
o.advertise = a
|
||||
}
|
||||
}
|
||||
|
||||
func Broker(b broker.Broker) Option {
|
||||
return func(o *options) {
|
||||
o.broker = b
|
||||
|
Reference in New Issue
Block a user