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:
@@ -6,10 +6,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/micro/go-micro/v2/client"
|
||||
"github.com/micro/go-micro/v2/client/selector"
|
||||
"github.com/micro/go-micro/v2/errors"
|
||||
"github.com/micro/go-micro/v2/registry"
|
||||
"github.com/micro/go-micro/v2/registry/memory"
|
||||
"github.com/micro/go-micro/v2/router"
|
||||
pgrpc "google.golang.org/grpc"
|
||||
pb "google.golang.org/grpc/examples/helloworld/helloworld"
|
||||
)
|
||||
@@ -56,16 +56,11 @@ func TestGRPCClient(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
// create selector
|
||||
se := selector.NewSelector(
|
||||
selector.Registry(r),
|
||||
)
|
||||
// create router
|
||||
rtr := router.NewRouter(router.Registry(r))
|
||||
|
||||
// create client
|
||||
c := NewClient(
|
||||
client.Registry(r),
|
||||
client.Selector(se),
|
||||
)
|
||||
c := NewClient(client.Router(rtr))
|
||||
|
||||
testMethods := []string{
|
||||
"/helloworld.Greeter/SayHello",
|
||||
|
||||
Reference in New Issue
Block a user