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 GitHub
parent a63480a81a
commit 174e44b846
46 changed files with 428 additions and 1572 deletions

View File

@@ -120,7 +120,7 @@ func (s *service) register() error {
return nil
}
// default to service registry
r := s.opts.Service.Client().Options().Registry
r := s.opts.Service.Options().Registry
// switch to option if specified
if s.opts.Registry != nil {
r = s.opts.Registry
@@ -173,7 +173,7 @@ func (s *service) deregister() error {
return nil
}
// default to service registry
r := s.opts.Service.Client().Options().Registry
r := s.opts.Service.Options().Registry
// switch to option if specified
if s.opts.Registry != nil {
r = s.opts.Registry
@@ -302,7 +302,7 @@ func (s *service) stop() error {
func (s *service) Client() *http.Client {
rt := mhttp.NewRoundTripper(
mhttp.WithRegistry(s.opts.Registry),
mhttp.WithRouter(s.opts.Service.Options().Router),
)
return &http.Client{
Transport: rt,