Documentation ¶
Index ¶
- func AllowAllPeerFilter() p2p.PeerFilter
- func ConnectednessToString(connectedness network.Connectedness) (string, bool)
- func CountStream(host host.Host, targetID peer.ID, protocol core.ProtocolID, ...) int
- func DirectionToString(direction network.Direction) (string, bool)
- func FilterStream(host host.Host, targetID peer.ID, protocol core.ProtocolID, ...) []network.Stream
- func FindOutboundStream(host host.Host, targetID peer.ID, protocol core.ProtocolID) (network.Stream, bool)
- func FlowStream(conn network.Conn) network.Stream
- func IPPortFromMultiAddress(addrs ...multiaddr.Multiaddr) (string, string, error)
- func NetworkingInfo(identity flow.Identity) (string, string, crypto.PubKey, error)
- func StreamLogger(log zerolog.Logger, stream network.Stream) zerolog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowAllPeerFilter ¶
func AllowAllPeerFilter() p2p.PeerFilter
AllowAllPeerFilter returns a peer filter that does not do any filtering.
func ConnectednessToString ¶
func ConnectednessToString(connectedness network.Connectedness) (string, bool)
ConnectednessToString reverse translates libp2p network connectedness to string
func CountStream ¶
func CountStream(host host.Host, targetID peer.ID, protocol core.ProtocolID, dir network.Direction) int
CountStream finds total number of outbound stream to the target id
func DirectionToString ¶
DirectionToString reverse translates libp2p network direction to string
func FilterStream ¶
func FilterStream(host host.Host, targetID peer.ID, protocol core.ProtocolID, dir network.Direction, all bool) []network.Stream
FilterStream finds one or all existing outbound streams to the target id if it exists. if parameter all is true - all streams are found else the first stream found is returned
func FindOutboundStream ¶
func FindOutboundStream(host host.Host, targetID peer.ID, protocol core.ProtocolID) (network.Stream, bool)
FindOutboundStream finds an existing outbound stream to the target id if it exists by querying libp2p
func FlowStream ¶
FlowStream returns the Flow protocol Stream in the connection if one exist, else it returns nil
func IPPortFromMultiAddress ¶
IPPortFromMultiAddress returns the IP/hostname and the port for the given multi-addresses associated with a libp2p host
func NetworkingInfo ¶
NetworkingInfo returns ip, port, libp2p public key of the identity.
Types ¶
This section is empty.