Anyone using custom transports for gRPC-go?

651 views
Skip to first unread message

jeremy...@gmail.com

unread,
Jun 3, 2016, 10:01:44 PM6/3/16
to grpc.io

I've been able to successfully use a custom transport (by implementing the net.Listener standard interface) and passing it into the Server.Serve(...) method; however, at the moment, it's fairly useless because gRPC clients require a grpc.ClientConn instance on creation.


Is there any documentation on how clients/servers use this connection object? 
I'd imagine the functionality exposed by the standard interface (net.Conn) is really all that's necessary for gRPC (i.e. open/close/read/write). I'd really like to be able to use a standard interface to swap out net.Listener/net.Conn implementations without having to completely rewrite the RPC.

Qi Zhao

unread,
Jun 6, 2016, 5:05:33 PM6/6/16
to jeremy...@gmail.com, grpc.io
To be clear, It seems you implemented a net.Listener instead of a transport. To implement a custom client/server transport, it is needed to implement grpc.ClientTransport/ServerTransport interface. We will support multiple transports but won't accept the transport impl externally unfortunately. 

On Fri, Jun 3, 2016 at 7:01 PM, <jeremy...@gmail.com> wrote:

I've been able to successfully use a custom transport (by implementing the net.Listener standard interface) and passing it into the Server.Serve(...) method; however, at the moment, it's fairly useless because gRPC clients require a grpc.ClientConn instance on creation.


Is there any documentation on how clients/servers use this connection object? 
I'd imagine the functionality exposed by the standard interface (net.Conn) is really all that's necessary for gRPC (i.e. open/close/read/write). I'd really like to be able to use a standard interface to swap out net.Listener/net.Conn implementations without having to completely rewrite the RPC.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/795d8704-15eb-446c-bc9b-0cfe73cb3ffc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
-Qi
Reply all
Reply to author
Forward
0 new messages