Update to match go-micro options

This commit is contained in:
Asim 2015-12-31 18:23:15 +00:00 committed by Vasiliy Tolstov
parent a9dc71f4ad
commit b71300b45b

View File

@ -12,6 +12,7 @@ import (
type nbroker struct { type nbroker struct {
addrs []string addrs []string
conn *nats.Conn conn *nats.Conn
opts broker.Options
} }
type subscriber struct { type subscriber struct {
@ -40,7 +41,7 @@ func (n *publication) Ack() error {
return nil return nil
} }
func (n *subscriber) Config() broker.SubscribeOptions { func (n *subscriber) Options() broker.SubscribeOptions {
return n.opts return n.opts
} }
@ -83,6 +84,10 @@ func (n *nbroker) Init(opts ...broker.Option) error {
return nil return nil
} }
func (n *nbroker) Options() broker.Options {
return n.opts
}
func (n *nbroker) Publish(topic string, msg *broker.Message, opts ...broker.PublishOption) error { func (n *nbroker) Publish(topic string, msg *broker.Message, opts ...broker.PublishOption) error {
b, err := json.Marshal(msg) b, err := json.Marshal(msg)
if err != nil { if err != nil {