From 1291ceb68c5206520549c6a82c962792dfe713d5 Mon Sep 17 00:00:00 2001 From: fztcjjl Date: Thu, 30 May 2019 11:45:20 +0800 Subject: [PATCH] use new NATS streaming client repo path --- options.go | 2 +- stan.go | 4 ++-- stan_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/options.go b/options.go index a91ecc4..e2a1162 100644 --- a/options.go +++ b/options.go @@ -6,7 +6,7 @@ import ( "github.com/micro/go-micro/broker" "github.com/micro/go-micro/server" - stan "github.com/nats-io/go-nats-streaming" + stan "github.com/nats-io/stan.go" ) type optionsKey struct{} diff --git a/stan.go b/stan.go index efe85c8..56ca110 100644 --- a/stan.go +++ b/stan.go @@ -14,7 +14,7 @@ import ( "github.com/micro/go-micro/broker" "github.com/micro/go-micro/cmd" "github.com/micro/go-micro/codec/json" - stan "github.com/nats-io/go-nats-streaming" + stan "github.com/nats-io/stan.go" ) type stanBroker struct { @@ -221,7 +221,7 @@ func (n *stanBroker) Connect() error { stan.ConnectWait(n.sopts.ConnectTimeout), stan.PubAckWait(n.sopts.AckTimeout), stan.MaxPubAcksInflight(n.sopts.MaxPubAcksInflight), - stan.Pings(n.sopts.PingIterval, n.sopts.PingMaxOut), + stan.Pings(n.sopts.PingInterval, n.sopts.PingMaxOut), stan.SetConnectionLostHandler(n.sopts.ConnectionLostCB), } nopts = append(nopts, stan.NatsURL(strings.Join(n.addrs, ","))) diff --git a/stan_test.go b/stan_test.go index c2b2b8e..7f502bd 100644 --- a/stan_test.go +++ b/stan_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/micro/go-micro/broker" - stan "github.com/nats-io/go-nats-streaming" + stan "github.com/nats-io/stan.go" ) var addrTestCases = []struct {