1 Star 0 Fork 0

仰望与星云 / qingya-yii2rpc-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

qingya-yii2rpc-client

介绍

基于hprose封装的yii2使用的rpc客户端

软件架构

软件架构说明

安装教程

composer require qingya/yii2rpc-server

使用说明

  1. env必须配置的参数,注意Yii框架配置等号前不能有空格,等号后的空格也是值的一部分
rpcServer.center=服务中心地址              #必须

#调试时使用,指定某个服务项目的服务地址,也可以直接通过client初始化设置
rpcServer.服务项目标识=对外的服务地址       #可选 配置后,请求指定的项目,优先走env配置,一般走服务中心获取

rpcServer.centerCacheTime=300             #可选 rpc服务中心请求缓存时间,默认300秒,0=不缓存

rpcClient.appKey=clientAppKey             #必须 客户端发起请求的appKey配置
rpcClient.appSecret=clientAppSecret       #必须 客户端发起请求的appSecret配置
rpcClient.system=default                  #当前项目标识(rpc中识别),建议入口文件做常量配置
rpcClient.usecache=false                  #可选 客户端请求是否走缓存,默认false,配置redis后开启

特别注意

客户端拼接完成的rpc服务请求url格式化:http://www.xxx.com/rpc/serviceName serviceName:对应服务端的rpc服务类名称,首字母大写

分版本请请求实现 通过header参数serviceversion区分要请求的目标服务版本

参与贡献

特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/
MIT License Copyright (c) 2021 仰望与星云 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于hprose封装的yii2使用的rpc客户端 展开 收起
PHP
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/phpwk/qingya-yii2rpc-client.git
git@gitee.com:phpwk/qingya-yii2rpc-client.git
phpwk
qingya-yii2rpc-client
qingya-yii2rpc-client
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891