Documentation ¶
Overview ¶
Package conncapture provides a credentials.TransportCredential wrapper that allows capturing the net.Conn as the peer.Addr which can be accessed by the server using peer.FromContext or the client using grpc.PeerCallOption. Be very careful in its use, as *most* things you might do with it *will* screwup your grpc. There is at least one case (sending of file descriptors over unix file sockets out of band) in which it is useful.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnToAddrInfo ¶
ConnToAddrInfo wraps conn so as to also meet the net.Addr interface
func FromContext ¶
FromContext - retrieve net.Conn from context. Only works inside a 'server' and only works when used in conjunction with conncapture.TransportCredentials(...)
func TransportCredentials ¶
func TransportCredentials(cred credentials.TransportCredentials) credentials.TransportCredentials
TransportCredentials wraps cred (which may be nil) such that peer.Addr *is* the net.Conn and can be access by the server using peer.FromContext or the client using grpc.PeerCallOption
Types ¶
This section is empty.