放开rpc 限制代码
This commit is contained in:
parent
eee83cc6d1
commit
5e429852ae
@ -165,10 +165,6 @@ func (this *RPCXService) RpcGo(ctx context.Context, servicePath string, serviceM
|
|||||||
///servicePath = worker/[worker_1,worker_2] 表示随机选择[]里面的服务节点执行rpc方法
|
///servicePath = worker/[worker_1,worker_2] 表示随机选择[]里面的服务节点执行rpc方法
|
||||||
///servicePath = worker/![worker_1,worker_2] 表示随机选择非[]里面的服务节点执行rpc方法
|
///servicePath = worker/![worker_1,worker_2] 表示随机选择非[]里面的服务节点执行rpc方法
|
||||||
func (this *RPCXService) AcrossClusterRpcCall(ctx context.Context, clusterTag string, servicePath string, serviceMethod string, args interface{}, reply interface{}) (err error) {
|
func (this *RPCXService) AcrossClusterRpcCall(ctx context.Context, clusterTag string, servicePath string, serviceMethod string, args interface{}, reply interface{}) (err error) {
|
||||||
if clusterTag == this.GetTag() {
|
|
||||||
err = fmt.Errorf("RPC equal clusterTag:%s ", clusterTag)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return rpcx.AcrossClusterCall(ctx, clusterTag, servicePath, serviceMethod, args, reply)
|
return rpcx.AcrossClusterCall(ctx, clusterTag, servicePath, serviceMethod, args, reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,10 +176,6 @@ func (this *RPCXService) AcrossClusterRpcCall(ctx context.Context, clusterTag st
|
|||||||
///servicePath = worker/[worker_1,worker_2] 表示随机选择[]里面的服务节点执行rpc方法
|
///servicePath = worker/[worker_1,worker_2] 表示随机选择[]里面的服务节点执行rpc方法
|
||||||
///servicePath = worker/![worker_1,worker_2] 表示随机选择非[]里面的服务节点执行rpc方法
|
///servicePath = worker/![worker_1,worker_2] 表示随机选择非[]里面的服务节点执行rpc方法
|
||||||
func (this *RPCXService) AcrossClusterRpcGo(ctx context.Context, clusterTag string, servicePath string, serviceMethod string, args interface{}, reply interface{}) (call *client.Call, err error) {
|
func (this *RPCXService) AcrossClusterRpcGo(ctx context.Context, clusterTag string, servicePath string, serviceMethod string, args interface{}, reply interface{}) (call *client.Call, err error) {
|
||||||
if clusterTag == this.GetTag() {
|
|
||||||
err = fmt.Errorf("RPC equal clusterTag:%s ", clusterTag)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return rpcx.AcrossClusterGo(ctx, clusterTag, servicePath, serviceMethod, args, reply, nil)
|
return rpcx.AcrossClusterGo(ctx, clusterTag, servicePath, serviceMethod, args, reply, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,10 +187,6 @@ func (this *RPCXService) AcrossClusterRpcGo(ctx context.Context, clusterTag stri
|
|||||||
///servicePath = worker/[worker_1,worker_2] 表示随机选择[]里面的服务节点执行rpc方法
|
///servicePath = worker/[worker_1,worker_2] 表示随机选择[]里面的服务节点执行rpc方法
|
||||||
///servicePath = worker/![worker_1,worker_2] 表示随机选择非[]里面的服务节点执行rpc方法
|
///servicePath = worker/![worker_1,worker_2] 表示随机选择非[]里面的服务节点执行rpc方法
|
||||||
func (this *RPCXService) AcrossClusterBroadcast(ctx context.Context, clusterTag string, servicePath string, serviceMethod string, args interface{}, reply interface{}) (err error) {
|
func (this *RPCXService) AcrossClusterBroadcast(ctx context.Context, clusterTag string, servicePath string, serviceMethod string, args interface{}, reply interface{}) (err error) {
|
||||||
if clusterTag == this.GetTag() {
|
|
||||||
err = fmt.Errorf("RPC equal clusterTag:%s ", clusterTag)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return rpcx.AcrossClusterBroadcast(ctx, clusterTag, servicePath, serviceMethod, args, reply)
|
return rpcx.AcrossClusterBroadcast(ctx, clusterTag, servicePath, serviceMethod, args, reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user