Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sermant-springboot-registry): 添加 Nacos 注册中心支持 #1688

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

xzhaoxz
Copy link

@xzhaoxz xzhaoxz commented Nov 29, 2024

What type of PR is this?

spring-boot supports nacos

What this PR does / why we need it?

SpringBoot provides service registration and discovery capabilities for pure SpringBoot applications, enabling users to quickly access the registry without modifying the code

Which issue(s) this PR fixes?

Fixes #

Does this PR introduce a user-facing change?

#1714

@xzhaoxz xzhaoxz force-pushed the nacos-register branch 3 times, most recently from 58d7643 to 52f7421 Compare November 29, 2024 09:50
@xzhaoxz xzhaoxz force-pushed the nacos-register branch 2 times, most recently from f18d059 to 6433cb0 Compare November 30, 2024 08:12
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 39.27393% with 184 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../sermant/discovery/config/NacosRegisterConfig.java 20.45% 69 Missing and 1 partial ⚠️
...iscovery/nacos/listen/NacosInstanceListenable.java 0.00% 36 Missing ⚠️
...ervice/lb/discovery/nacos/NacosServiceManager.java 59.64% 19 Missing and 4 partials ⚠️
...rvice/lb/discovery/nacos/NacosDiscoveryClient.java 55.10% 21 Missing and 1 partial ⚠️
...a/io/sermant/discovery/entity/RegisterContext.java 32.14% 19 Missing ⚠️
...scovery/service/lb/cache/InstanceCacheManager.java 0.00% 4 Missing ⚠️
...sermant/discovery/service/lb/DiscoveryManager.java 40.00% 1 Missing and 2 partials ⚠️
...scovery/service/lb/rule/NacosWeightRandomRule.java 87.50% 1 Missing and 2 partials ⚠️
...ermant/discovery/config/DiscoveryPluginConfig.java 50.00% 2 Missing ⚠️
...nt/discovery/service/lb/discovery/zk/ZkClient.java 50.00% 0 Missing and 1 partial ⚠️
... and 1 more
Flag Coverage Δ Complexity Δ
unittests 43.75% <39.27%> (-0.46%) 181.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
...ain/java/io/sermant/discovery/config/LbConfig.java 57.02% <ø> (+0.22%) 0.00 <0.00> (ø)
...java/io/sermant/discovery/config/RegisterType.java 100.00% <100.00%> (ø) 0.00 <0.00> (?)
...y/service/lb/discovery/InstanceChangeListener.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ervice/lb/discovery/zk/ZkDiscoveryClientProxy.java 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...e/lb/discovery/zk/listen/ZkInstanceListenable.java 40.25% <100.00%> (ø) 0.00 <0.00> (ø)
...nt/discovery/service/lb/discovery/zk/ZkClient.java 65.21% <50.00%> (+1.58%) 0.00 <0.00> (ø)
...ery/service/lb/discovery/zk/ZkDiscoveryClient.java 51.20% <0.00%> (ø) 0.00 <0.00> (ø)
...ermant/discovery/config/DiscoveryPluginConfig.java 75.00% <50.00%> (-8.34%) 0.00 <0.00> (ø)
...sermant/discovery/service/lb/DiscoveryManager.java 76.66% <40.00%> (+0.26%) 0.00 <0.00> (ø)
...scovery/service/lb/rule/NacosWeightRandomRule.java 87.50% <87.50%> (ø) 0.00 <0.00> (?)
... and 6 more

... and 164 files with indirect coverage changes

@zwmagic zwmagic self-requested a review December 2, 2024 13:53
@xzhaoxz xzhaoxz force-pushed the nacos-register branch 3 times, most recently from 4cdd419 to e575b30 Compare December 26, 2024 01:47
- 新增 NacosRegisterConfig 类用于配置 Nacos 相关参数
- 实现 NacosDiscoveryClient 类以支持 Nacos服务发现和注册
- 添加 NacosServiceManager 类用于管理 Nacos 服务
- 实现 NacosInstanceListenable 类以监听 Nacos 实例变化
- 新增 NacosWeightRandomRule 类用于 Nacos 权重随机负载均衡
- 更新配置文件和资源文件以支持 Nacos

Signed-off-by: xiaozhao <[email protected]>
@Sherlockhan Sherlockhan merged commit b12c416 into sermant-io:develop Jan 2, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants