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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user