v3 refactor (#1868)

* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
Asim Aslam
2020-07-27 13:22:00 +01:00
committed by GitHub
parent 9dfeb98111
commit 563768b58a
424 changed files with 6383 additions and 22490 deletions

View File

@@ -3,7 +3,7 @@ package nats
import (
"context"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v3/broker"
)
// setBrokerOption returns a function to setup a context with given value

View File

@@ -7,10 +7,10 @@ import (
"strings"
"sync"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v2/codec/json"
"github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/codec/json"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/registry/mdns"
nats "github.com/nats-io/nats.go"
)
@@ -310,7 +310,7 @@ func NewBroker(opts ...broker.Option) broker.Broker {
// Default codec
Codec: json.Marshaler{},
Context: context.Background(),
Registry: registry.DefaultRegistry,
Registry: mdns.NewRegistry(),
}
n := &natsBroker{

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v3/broker"
nats "github.com/nats-io/nats.go"
)

View File

@@ -1,7 +1,7 @@
package nats
import (
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v3/broker"
nats "github.com/nats-io/nats.go"
)