drpc
drpc copied to clipboard
Support for custom codec?
Is there any support for using other codec other than protobufs? How would you implement a server using a custom codec?
Yep, that's what the Encoding type is supposed to abstract.
The code generator still requires a proto service definition and message types, but you can use the protolib option to specify an import path (for example, this specifies the import path of storj.io/drpc/internal/integration/customencoding) to a package that contains top level Marshal and Unmarshal functions (for example, this just dispatches to protobuf again, but you can do whatever you want here).
Do you have a specific encoding you want to use? I can try to figure out some more of the details if you have a concrete encoding in mind already.
Thanks for the tips. I'm thinking of using flatbuffers with drpc, if that's possible.
I'm going to close this out. If you did make it work with flatbuffers in a way that can be shared, I'd love to see it!
Thanks for the tips. I'm thinking of using flatbuffers with drpc, if that's possible.
were you able to try it? please share the documentation, if you've created any. Thanks