mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 04:58:31 -05:00
Bump github.com/go-micro/plugins/v4/registry/consul from 1.2.0 to 1.2.1
Bumps [github.com/go-micro/plugins/v4/registry/consul](https://github.com/go-micro/plugins) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/go-micro/plugins/releases) - [Commits](https://github.com/go-micro/plugins/compare/v4/auth/jwt/v1.2.0...v4/logger/zap/v1.2.1) --- updated-dependencies: - dependency-name: github.com/go-micro/plugins/v4/registry/consul dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
6ed9e2b6c8
commit
a1e69c6a5c
+10
-1
@@ -47,7 +47,7 @@ func newConsulWatcher(cr *consulRegistry, opts ...registry.WatchOption) (registr
|
||||
return nil, err
|
||||
}
|
||||
|
||||
wp.Handler = cw.handle
|
||||
wp.Handler = cw.serviceHandler
|
||||
go wp.RunWithClientAndHclog(cr.Client(), wp.Logger)
|
||||
cw.wp = wp
|
||||
|
||||
@@ -184,6 +184,15 @@ func (cw *consulWatcher) serviceHandler(idx uint64, data interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
// there are no services in the service, empty all services
|
||||
if len(rservices) != 0 && serviceName == "" {
|
||||
for _, services := range rservices {
|
||||
for _, service := range services {
|
||||
cw.next <- ®istry.Result{Action: "delete", Service: service}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cw.Lock()
|
||||
cw.services[serviceName] = newServices
|
||||
cw.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user