Deprecate client/selector (#1767)
* client/{grpc,rpc}: depricate selector (wip) * {client,cmd}: remove client/selector * deprecate client/selector * router/static: fix lookup * config/cmd: add support for legacy static selector flag * config/cmd: add support for legacy dns selector flag
This commit is contained in:
parent
12ac73e50b
commit
b26f4d8dd0
@ -11,6 +11,7 @@ import (
|
|||||||
gcli "github.com/micro/go-micro/v2/client/grpc"
|
gcli "github.com/micro/go-micro/v2/client/grpc"
|
||||||
"github.com/micro/go-micro/v2/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
rmemory "github.com/micro/go-micro/v2/registry/memory"
|
rmemory "github.com/micro/go-micro/v2/registry/memory"
|
||||||
|
"github.com/micro/go-micro/v2/router"
|
||||||
"github.com/micro/go-micro/v2/server"
|
"github.com/micro/go-micro/v2/server"
|
||||||
gsrv "github.com/micro/go-micro/v2/server/grpc"
|
gsrv "github.com/micro/go-micro/v2/server/grpc"
|
||||||
tgrpc "github.com/micro/go-micro/v2/transport/grpc"
|
tgrpc "github.com/micro/go-micro/v2/transport/grpc"
|
||||||
@ -110,14 +111,17 @@ func TestGRPCServer(t *testing.T) {
|
|||||||
r := rmemory.NewRegistry()
|
r := rmemory.NewRegistry()
|
||||||
b := bmemory.NewBroker()
|
b := bmemory.NewBroker()
|
||||||
tr := tgrpc.NewTransport()
|
tr := tgrpc.NewTransport()
|
||||||
|
rtr := router.NewRouter(router.Registry(r))
|
||||||
|
|
||||||
s := gsrv.NewServer(
|
s := gsrv.NewServer(
|
||||||
server.Broker(b),
|
server.Broker(b),
|
||||||
server.Name("foo"),
|
server.Name("foo"),
|
||||||
server.Registry(r),
|
server.Registry(r),
|
||||||
server.Transport(tr),
|
server.Transport(tr),
|
||||||
)
|
)
|
||||||
|
|
||||||
c := gcli.NewClient(
|
c := gcli.NewClient(
|
||||||
client.Registry(r),
|
client.Router(rtr),
|
||||||
client.Broker(b),
|
client.Broker(b),
|
||||||
client.Transport(tr),
|
client.Transport(tr),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user