github.com/jhump/grpctunnel (go): Package grpctunnel provides APIs to support tunneling of gRPC services: carrying gRPC calls over a gRPC stream.  A tunnel is a gRPC stream on which you can send other RPC requests, in either direction.  A "forward" tunnel is a tunnel in the normal direction, where the gRPC client initiates RPCs by sending requests, and the gRPC server acts on them and responses.  Forward tunnels allow a client to pin RPCs to a single server since they are all sent over a single stream. Forward tunnels work like so:  A "reverse" tunnel is a tunnel in the opposite direction of normal: the gRPC server is the actor that initiates RPCs by sending requests, and a gRPC client handles these requests and sends responses.  Reverse tunnels allow for interesting "server push" scenarios, where the pushed messages can be more advanced than "fire and forget" but actually need responses/acknowledgements. Reverse tunnels work like so:  The TunnelServiceHandler is what implements the tunneling protocol. You can register the RPC services available for forward tunnels with it. You can also use it to access reverse tunnels, for the server to send RPCs back to the client. See NewTunnelServiceHandler.  This is the value that is registered with a *grpc.Server to expose the Tunnel service.
Keywords: go|golang|grpc|tunneling