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:
ben-toogood 2020-07-01 17:06:59 +01:00 committed by Vasiliy Tolstov
parent ec57919c6b
commit 05aee1a3c2

View File

@ -1,6 +1,8 @@
package static package static
import "github.com/micro/go-micro/v2/router" import (
"github.com/micro/go-micro/v2/router"
)
// NewRouter returns an initialized static router // NewRouter returns an initialized static router
func NewRouter(opts ...router.Option) router.Router { func NewRouter(opts ...router.Option) router.Router {
@ -39,8 +41,8 @@ func (s *static) Process(*router.Advert) error {
return nil return nil
} }
func (s *static) Lookup(...router.QueryOption) ([]router.Route, error) { func (s *static) Lookup(opts ...router.QueryOption) ([]router.Route, error) {
return nil, nil return s.table.Query(opts...)
} }
func (s *static) Watch(opts ...router.WatchOption) (router.Watcher, error) { func (s *static) Watch(opts ...router.WatchOption) (router.Watcher, error) {