v3 refactor (#1868)
* Move to v3 Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
}),
|
||||
|
Reference in New Issue
Block a user