Skip to content

Conversation

@baisiyi
Copy link
Contributor

@baisiyi baisiyi commented Nov 7, 2025

类型

  • Feature(新功能)

功能描述

XClientPoolOneClientPool 添加 SetPluginsGetPlugins 方法,使其能够支持插件注册和管理。

变更内容

  • ✅ 在 XClientPool 中添加 SetPluginsGetPlugins 方法
  • ✅ 在 OneClientPool 中添加 SetPluginsGetPlugins 方法
  • ✅ 添加完整的测试用例,覆盖基本功能、边界情况和并发场景
  • ✅ 遵循与现有 Auth 方法相同的实现模式和代码风格

实现细节

  • SetPlugins 方法会将 plugins 设置到 pool 并传递给所有 clients
  • GetPlugins 方法返回 pool 的 plugins
  • 实现方式与 Auth 方法保持一致,使用相同的锁机制(XClientPool 使用 RWMutex)

测试

  • ✅ 所有新增测试用例通过
  • ✅ 测试覆盖了基本功能、边界情况和并发场景
  • ✅ 代码编译通过,无 lint 错误

相关 Issue

#913

检查清单

  • 代码遵循项目规范
  • 添加了测试用例
  • 所有测试通过
  • 代码编译通过
  • 无 lint 错误

- Add SetPlugins and GetPlugins methods to XClientPool
- Add SetPlugins and GetPlugins methods to OneClientPool
- Add comprehensive test cases for both pools
- Follow the same pattern as Auth method implementation
@smallnest
Copy link
Owner

感谢你的pr, 尤其是描述信息非常清晰,实现也是最简实现。 👍

@smallnest smallnest closed this Nov 7, 2025
@smallnest smallnest merged commit 12b77d7 into smallnest:master Nov 7, 2025
1 check 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.

2 participants