diff --git a/v2/registry/consul/watcher.go b/v2/registry/consul/watcher.go index 9323dbba..fa8e73f0 100644 --- a/v2/registry/consul/watcher.go +++ b/v2/registry/consul/watcher.go @@ -40,7 +40,10 @@ func newConsulWatcher(cr *consulRegistry, opts ...registry.WatchOption) (registr services: make(map[string][]*registry.Service), } - wp, err := watch.Parse(map[string]interface{}{"type": "services"}) + wp, err := watch.Parse(map[string]interface{}{ + "service": wo.Service, + "type": "service", + }) if err != nil { return nil, err } diff --git a/v3/registry/consul/watcher.go b/v3/registry/consul/watcher.go index 29d05fd4..e4a1709e 100644 --- a/v3/registry/consul/watcher.go +++ b/v3/registry/consul/watcher.go @@ -38,7 +38,10 @@ func newConsulWatcher(cr *consulRegistry, opts ...registry.WatchOption) (registr services: make(map[string][]*registry.Service), } - wp, err := watch.Parse(map[string]interface{}{"type": "services"}) + wp, err := watch.Parse(map[string]interface{}{ + "service": wo.Service, + "type": "service", + }) if err != nil { return nil, err } diff --git a/v4/registry/consul/watcher.go b/v4/registry/consul/watcher.go index 87fedbc0..5ba7881d 100644 --- a/v4/registry/consul/watcher.go +++ b/v4/registry/consul/watcher.go @@ -39,7 +39,10 @@ func newConsulWatcher(cr *consulRegistry, opts ...registry.WatchOption) (registr services: make(map[string][]*registry.Service), } - wp, err := watch.Parse(map[string]interface{}{"type": "services"}) + wp, err := watch.Parse(map[string]interface{}{ + "service": wo.Service, + "type": "service", + }) if err != nil { return nil, err }