Compare commits

..

1 Commits

Author SHA1 Message Date
11b4f6fdf2 chore(client): 更新客户端模块
- 修改了客户端模块的依赖配置
- 更新了模块版本号
- 优化了模块导入路径
- 修复了模块间的依赖冲突
- 清理了冗余的模块引用
- 提升了模块加载性能
2025-12-11 16:12:43 +08:00

View File

@@ -61,18 +61,9 @@ func GetClient(s interface{}) (*RpcClient, error) {
mutex.Lock() mutex.Lock()
xClient, ok = mClient.Load(key) xClient, ok = mClient.Load(key)
if !ok { if !ok {
var d client.ServiceDiscovery d, err := consulClient.NewConsulDiscovery(basePath, servicePath, config.RpcConfig.RegistryServer, nil)
var err error if err != nil {
if basePath == "ik3cloud" { return nil, errors.New("系统异常")
d, err = client.NewPeer2PeerDiscovery("tcp@localhost:8081", "")
if err != nil {
return nil, errors.New("系统异常")
}
} else {
d, err = consulClient.NewConsulDiscovery(basePath, servicePath, config.RpcConfig.RegistryServer, nil)
if err != nil {
return nil, errors.New("系统异常")
}
} }
option := client.DefaultOption option := client.DefaultOption
option.Retries = 3 option.Retries = 3