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

@@ -10,9 +10,9 @@ import (
"net/url"
"path"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/proxy"
"github.com/micro/go-micro/v2/server"
"github.com/micro/go-micro/v3/errors"
"github.com/micro/go-micro/v3/proxy"
"github.com/micro/go-micro/v3/server"
)
// Proxy will proxy rpc requests as http POST requests. It is a server.Proxy

View File

@@ -8,10 +8,11 @@ import (
"sync"
"testing"
"github.com/micro/go-micro/v2"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/registry/memory"
"github.com/micro/go-micro/v2/server"
"github.com/micro/go-micro/v3/client"
"github.com/micro/go-micro/v3/registry/memory"
"github.com/micro/go-micro/v3/server"
"github.com/micro/go-micro/v3/service"
"github.com/micro/go-micro/v3/service/mucp"
)
type testHandler struct{}
@@ -56,11 +57,11 @@ func TestHTTPProxy(t *testing.T) {
wg.Add(1)
// new micro service
service := micro.NewService(
micro.Context(ctx),
micro.Name("foobar"),
micro.Registry(memory.NewRegistry()),
micro.AfterStart(func() error {
service := mucp.NewService(
service.Context(ctx),
service.Name("foobar"),
service.Registry(memory.NewRegistry()),
service.AfterStart(func() error {
wg.Done()
return nil
}),