package
0.0.0-20221016140111-fa5d5e9b535d
Repository: https://github.com/bitini111/rpcxapp.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
从context中获取本次rpc来源的uid.
获取context透传下来的dstSvid发起指定了svrid的调用时,会用到该方法。.
从context中获取本次rpc来源的ip地址.
No description provided by the author
把ip地址透传到下一个调用中去。.
把seq也透传到下一个调用中去。.
把uid也透传到下一个调用中去。.
封装好发起rpc调用的客户端!.
封装好发起rpc调用的客户端!(args和reply都是字节切片的格式),以插件的形式实现!.
封装好发起rpc调用的客户端,且指定目标svrid!(args和reply都是字节切片的格式),以插件的形式实现!.
No description provided by the author
根据指定的svid发起rpc调用.
# Constants
传递客户端请求序列号,rpc服务在必要时可以快速响应该seq的请求.(比如 game服快速响应操作).
rpc调用时,传递客户端的这个socket连接对应的uid,便于业务做安全性检测.
rpcClient中记录下目标svrid,以便于选择合适的服务端.
请求方的ip地址;access转入登录的时候会用到。.
传递rpc请求源的名称.
传递rpc请求源的svrid.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
自定义配置,核心:SerializeType,透传的时候使用.
自定义配置,默认编码方式修改为PB,不使用maspack(因为:使用msgpack的时候,pb中修改了字段的话,用到了该结构体的多出服务都需要重启,否则会报如下错误)2020/07/16 17:18:50 server.go:414: WARN : rpcx: failed to handle request: RPC获取userInfo出错! LoginService Login.
No description provided by the author
# Interfaces
传入的请求参数必须是实现了marshal的接口修改说明:在改之前调用XCall时的args参数类型是interface{},此处添加TheMarshaler之后,就确保了传入的参数必须是实现了Marshal方法的结构体指针。避免了传入结构体的运行时错误。.
# Type aliases
No description provided by the author