We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc的实现相当于notify
func (a *agent) RPC(route string, v interface{}) error { if a.status() == statusClosed { return ErrBrokenPipe } data, err := message.Serialize(v) if err != nil { return err } msg := &message.Message{ Type: message.Notify, Route: route, Data: data, } a.rpcHandler(a.session, msg, true) return nil }
希望返回interface, err := a.rpcHandler(a.session, msg, true), 这个interface可以转成需要的类型,不知道大家怎么处理的??
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
讨论无果,好像故意做成这样的
我实现了一个版本,不过改的地方比较多,服务加载,remote和local都要处理
No branches or pull requests
rpc的实现相当于notify
func (a *agent) RPC(route string, v interface{}) error {
if a.status() == statusClosed {
return ErrBrokenPipe
}
data, err := message.Serialize(v)
if err != nil {
return err
}
msg := &message.Message{
Type: message.Notify,
Route: route,
Data: data,
}
a.rpcHandler(a.session, msg, true)
return nil
}
希望返回interface, err := a.rpcHandler(a.session, msg, true), 这个interface可以转成需要的类型,不知道大家怎么处理的??
The text was updated successfully, but these errors were encountered: