Update to match go-micro options
This commit is contained in:
parent
a9dc71f4ad
commit
b71300b45b
7
nats.go
7
nats.go
@ -12,6 +12,7 @@ import (
|
||||
type nbroker struct {
|
||||
addrs []string
|
||||
conn *nats.Conn
|
||||
opts broker.Options
|
||||
}
|
||||
|
||||
type subscriber struct {
|
||||
@ -40,7 +41,7 @@ func (n *publication) Ack() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *subscriber) Config() broker.SubscribeOptions {
|
||||
func (n *subscriber) Options() broker.SubscribeOptions {
|
||||
return n.opts
|
||||
}
|
||||
|
||||
@ -83,6 +84,10 @@ func (n *nbroker) Init(opts ...broker.Option) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *nbroker) Options() broker.Options {
|
||||
return n.opts
|
||||
}
|
||||
|
||||
func (n *nbroker) Publish(topic string, msg *broker.Message, opts ...broker.PublishOption) error {
|
||||
b, err := json.Marshal(msg)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user