Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedSubscription ¶
AllowedSubscription returns true if the given role is allowed to subscribe to the topic.
func MultiAddressStr ¶
MultiAddressStr receives a node ip and port and returns its corresponding Libp2p MultiAddressStr in string format in current implementation IP part of the node address is either an IP or a dns4. https://docs.libp2p.io/concepts/addressing/
func PeerAddressInfo ¶
PeerAddressInfo generates the libp2p peer.AddrInfo for the given Flow.Identity. A node in flow is defined by a flow.Identity while it is defined by a peer.AddrInfo in libp2p.
flow.Identity ---> peer.AddrInfo |-- Address ---> |-- []multiaddr.Multiaddr |-- NetworkPublicKey ---> |-- ID
func PeerInfosFromIDs ¶
func PeerInfosFromIDs(ids flow.IdentityList) ([]peer.AddrInfo, map[flow.Identifier]error)
PeerInfosFromIDs converts the given flow.Identities to peer.AddrInfo. For each identity, if the conversion succeeds, the peer.AddrInfo is included in the result else it is included in the error map with the corresponding error
Types ¶
This section is empty.