Update to match go-micro interface
This commit is contained in:
parent
0745de181c
commit
a0e851fa4d
9
nats.go
9
nats.go
@ -142,9 +142,14 @@ func (n *nbroker) String() string {
|
||||
return "nats"
|
||||
}
|
||||
|
||||
func NewBroker(addrs []string, opt ...broker.Option) broker.Broker {
|
||||
func NewBroker(opts ...broker.Option) broker.Broker {
|
||||
var options broker.Options
|
||||
for _, o := range opts {
|
||||
o(&options)
|
||||
}
|
||||
|
||||
var cAddrs []string
|
||||
for _, addr := range addrs {
|
||||
for _, addr := range options.Addrs {
|
||||
if len(addr) == 0 {
|
||||
continue
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user