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:
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/micro/go-micro/v2/auth"
|
||||
"github.com/micro/go-micro/v2/broker"
|
||||
"github.com/micro/go-micro/v2/client"
|
||||
"github.com/micro/go-micro/v2/client/selector"
|
||||
"github.com/micro/go-micro/v2/config"
|
||||
"github.com/micro/go-micro/v2/config/cmd"
|
||||
"github.com/micro/go-micro/v2/debug/profile"
|
||||
@@ -16,6 +15,7 @@ import (
|
||||
"github.com/micro/go-micro/v2/registry"
|
||||
"github.com/micro/go-micro/v2/router"
|
||||
"github.com/micro/go-micro/v2/runtime"
|
||||
"github.com/micro/go-micro/v2/selector"
|
||||
"github.com/micro/go-micro/v2/server"
|
||||
"github.com/micro/go-micro/v2/store"
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
@@ -139,8 +139,9 @@ func Store(s store.Store) Option {
|
||||
func Registry(r registry.Registry) Option {
|
||||
return func(o *Options) {
|
||||
o.Registry = r
|
||||
// Update Client and Server
|
||||
o.Client.Init(client.Registry(r))
|
||||
// Update router
|
||||
o.Router.Init(router.Registry(r))
|
||||
// Update server
|
||||
o.Server.Init(server.Registry(r))
|
||||
// Update Broker
|
||||
o.Broker.Init(broker.Registry(r))
|
||||
|
Reference in New Issue
Block a user