Open Skyenought opened 8 months ago
fix
在之前的 Name() 实现中return 的是一个常量, 在使用不同配置的 nacos 的默认情况下 uniqueKey := cacheKey(config.Resolver.Name(), config.Balancer.Name(), config.LbOpts) 会在短时间取到相同的结果
uniqueKey := cacheKey(config.Resolver.Name(), config.Balancer.Name(), config.LbOpts)
于是现在添加 timestamp 作为唯一标识, 防止出现取到错误数据
https://github.com/hertz-contrib/registry/issues/107
What type of PR is this?
fix
What this PR does / why we need it (English/Chinese):
在之前的 Name() 实现中return 的是一个常量, 在使用不同配置的 nacos 的默认情况下
uniqueKey := cacheKey(config.Resolver.Name(), config.Balancer.Name(), config.LbOpts)
会在短时间取到相同的结果于是现在添加 timestamp 作为唯一标识, 防止出现取到错误数据
Which issue(s) this PR fixes:
https://github.com/hertz-contrib/registry/issues/107