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

@@ -4,12 +4,17 @@ import (
"context"
"time"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/model"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/server"
"github.com/micro/go-micro/v2/transport"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/broker/http"
"github.com/micro/go-micro/v3/client"
mucpClient "github.com/micro/go-micro/v3/client/mucp"
"github.com/micro/go-micro/v3/model"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/server"
mucpServer "github.com/micro/go-micro/v3/server/mucp"
"github.com/micro/go-micro/v3/transport"
thttp "github.com/micro/go-micro/v3/transport/http"
)
type Options struct {
@@ -35,11 +40,11 @@ type Option func(*Options)
func NewOptions(opts ...Option) Options {
opt := Options{
Broker: broker.DefaultBroker,
Client: client.DefaultClient,
Server: server.DefaultServer,
Registry: registry.DefaultRegistry,
Transport: transport.DefaultTransport,
Broker: http.NewBroker(),
Client: mucpClient.NewClient(),
Server: mucpServer.NewServer(),
Registry: mdns.NewRegistry(),
Transport: thttp.NewTransport(),
Context: context.Background(),
}