-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
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
Support for method name mapping #8
Comments
This should be implemented in net/rpc, otherwise we'll have to implement this in each codec… Can you please ask Go developers about adding this feature into net/rpc? If they're willing to do this, in any way, then it's better to send PR to net/rpc. If they'll refuse to add this feature - then I'll accept PR with generic method transform callback. |
Thanks. I've submitted golang/go#16449. We'll see if there is any interest. |
Looks like net/rpc has been frozen due to problems, and they are recommending alternatives such as http://www.grpc.io/ |
@powerman Given that net/rpc has been frozen, are you open to add this feature in powerman/rpc-codec? It makes migrating from other JSON-RPC implementation to this repo a lot easier. |
@libreoscar Given that net/rpc has been frozen, I think better solution should be to reimplement JSON RPC 2.0 as new package which doesn't depend on net/rpc. This helps to avoid several ugly workarounds required because of net/rpc and enable new features like method name mapping. But meanwhile we can add this feature here if anyone will send me good enough PR with tests. |
I'm converting a legacy system from Python into Go, and I have some restrictions on the method names that don't work with Go's RPC layer and rpc-codec. The legacy method names are all lowercase and do not have a namespace structure "namespace.method". rpc-codec works great for me with a small hack to add "default." and capitalize the first letter of the method name. Is there an interest in making this part of rpc-codec. If desired, I could change this to a more generic "method transform" callback.
see:
tdterry@a61f131
The text was updated successfully, but these errors were encountered: