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

@@ -6,12 +6,14 @@ import (
"sync"
"time"
"github.com/micro/go-micro/v2/auth"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v2/codec"
"github.com/micro/go-micro/v2/debug/trace"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/transport"
"github.com/micro/go-micro/v3/auth"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/broker/http"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/debug/trace"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/transport"
)
type Options struct {
@@ -61,16 +63,12 @@ func newOptions(opt ...Option) Options {
o(&opts)
}
if opts.Auth == nil {
opts.Auth = auth.DefaultAuth
}
if opts.Broker == nil {
opts.Broker = broker.DefaultBroker
opts.Broker = http.NewBroker()
}
if opts.Registry == nil {
opts.Registry = registry.DefaultRegistry
opts.Registry = mdns.NewRegistry()
}
if opts.Transport == nil {