Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewListener ¶
NewListener turns a libp2p host into a net listener.
func RemotePeerFromContext ¶
RemotePeerFromContext extracts remote peer from ctx
func WithP2PCredentials ¶
func WithP2PCredentials() grpc.ServerOption
WithP2PCredentials exposes the libp2p stream to the grpc service via a custom AuthInfo.
func WithP2PDialer ¶
WithP2PDialer uses a libp2p host as dialer. Use the id of the target host to create a connection. The dialer does not connect the current host to the target host, this must be checked before establishing a connection. It just wraps a gRPC connection in a libp2p stream.
Types ¶
type AuthInfo ¶
AuthInfo embed original libp2p stream
func AuthInfoFromContext ¶
AuthInfoFromContext extracts p2p AuthInfo from ctx
Source Files
¶
Click to show internal directories.
Click to hide internal directories.