add client address option, fix noop resolver

This commit is contained in:
Adphi 2021-11-22 14:26:05 +01:00
parent e8f0a2f03d
commit 1bad45b563
2 changed files with 3 additions and 2 deletions

View File

@ -48,5 +48,5 @@ func (n noop) Watch(option ...registry.WatchOption) (registry.Watcher, error) {
} }
func (n noop) String() string { func (n noop) String() string {
return "passthroug" return "noop"
} }

View File

@ -34,7 +34,8 @@ type resolvr struct {
} }
func (r *resolvr) run() { func (r *resolvr) run() {
if r.reg.String() == "passthroug" { if r.reg.String() == "noop" {
r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint}}})
return return
} }
var name, version string var name, version string