Documentation ¶
Index ¶
- func NewNoopLibP2PHost() noopLibP2PHost
- type NetworkAPI
- func (networkAPI *NetworkAPI) NetAddrsListen(context.Context) (peer.AddrInfo, error)
- func (networkAPI *NetworkAPI) NetworkConnect(ctx context.Context, addrs []string) (<-chan net.ConnectionResult, error)
- func (networkAPI *NetworkAPI) NetworkFindPeer(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error)
- func (networkAPI *NetworkAPI) NetworkFindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan peer.AddrInfo
- func (networkAPI *NetworkAPI) NetworkGetBandwidthStats() metrics.Stats
- func (networkAPI *NetworkAPI) NetworkGetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error)
- func (networkAPI *NetworkAPI) NetworkGetPeerAddresses() []ma.Multiaddr
- func (networkAPI *NetworkAPI) NetworkGetPeerID() peer.ID
- func (networkAPI *NetworkAPI) NetworkPeers(ctx context.Context, verbose, latency, streams bool) (*net.SwarmConnInfos, error)
- func (networkAPI *NetworkAPI) Version(context.Context) (Version, error)
- type NetworkSubmodule
- func (networkSubmodule *NetworkSubmodule) API() *NetworkAPI
- func (networkSubmodule *NetworkSubmodule) FetchMessagesByCids(ctx context.Context, cids []cid.Cid) ([]*types.UnsignedMessage, error)
- func (networkSubmodule *NetworkSubmodule) FetchSignedMessagesByCids(ctx context.Context, cids []cid.Cid) ([]*types.SignedMessage, error)
- func (networkSubmodule *NetworkSubmodule) Stop(ctx context.Context)
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NetworkAPI ¶
type NetworkAPI struct {
// contains filtered or unexported fields
}
func (*NetworkAPI) NetAddrsListen ¶
func (*NetworkAPI) NetworkConnect ¶
func (networkAPI *NetworkAPI) NetworkConnect(ctx context.Context, addrs []string) (<-chan net.ConnectionResult, error)
NetworkConnect connects to peers at the given addresses
func (*NetworkAPI) NetworkFindPeer ¶
func (networkAPI *NetworkAPI) NetworkFindPeer(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error)
NetworkFindPeer searches the libp2p router for a given peer id
func (*NetworkAPI) NetworkFindProvidersAsync ¶
func (networkAPI *NetworkAPI) NetworkFindProvidersAsync(ctx context.Context, key cid.Cid, count int) <-chan peer.AddrInfo
NetworkFindProvidersAsync issues a findProviders query to the filecoin network content router.
func (*NetworkAPI) NetworkGetBandwidthStats ¶
func (networkAPI *NetworkAPI) NetworkGetBandwidthStats() metrics.Stats
NetworkGetBandwidthStats gets stats on the current bandwidth usage of the network
func (*NetworkAPI) NetworkGetClosestPeers ¶
func (networkAPI *NetworkAPI) NetworkGetClosestPeers(ctx context.Context, key string) (<-chan peer.ID, error)
NetworkGetClosestPeers issues a getClosestPeers query to the filecoin network.
func (*NetworkAPI) NetworkGetPeerAddresses ¶
func (networkAPI *NetworkAPI) NetworkGetPeerAddresses() []ma.Multiaddr
NetworkGetPeerAddresses gets the current addresses of the node
func (*NetworkAPI) NetworkGetPeerID ¶
func (networkAPI *NetworkAPI) NetworkGetPeerID() peer.ID
NetworkGetPeerID gets the current peer id of the node
func (*NetworkAPI) NetworkPeers ¶
func (networkAPI *NetworkAPI) NetworkPeers(ctx context.Context, verbose, latency, streams bool) (*net.SwarmConnInfos, error)
NetworkPeers lists peers currently available on the network
type NetworkSubmodule ¶
type NetworkSubmodule struct { NetworkName string Host host.Host // Router is a router from IPFS Router routing.Routing Pubsub *libp2pps.PubSub // TODO: split chain bitswap from storage bitswap (issue: ???) Bitswap exchange.Interface Network *net.Network GraphExchange graphsync.GraphExchange PeerMgr net.IPeerMgr //data transfer DataTransfer datatransfer.Manager DataTransferHost dtnet.DataTransferNetwork // contains filtered or unexported fields }
NetworkSubmodule enhances the `Node` with networking capabilities.
func NewNetworkSubmodule ¶
func NewNetworkSubmodule(ctx context.Context, config networkConfig, repo networkRepo, blockstore *blockstore.BlockstoreSubmodule) (*NetworkSubmodule, error)
NewNetworkSubmodule creates a new network submodule.
func (*NetworkSubmodule) API ¶
func (networkSubmodule *NetworkSubmodule) API() *NetworkAPI
func (*NetworkSubmodule) FetchMessagesByCids ¶
func (networkSubmodule *NetworkSubmodule) FetchMessagesByCids( ctx context.Context, cids []cid.Cid, ) ([]*types.UnsignedMessage, error)
func (*NetworkSubmodule) FetchSignedMessagesByCids ¶
func (networkSubmodule *NetworkSubmodule) FetchSignedMessagesByCids( ctx context.Context, cids []cid.Cid, ) ([]*types.SignedMessage, error)
func (*NetworkSubmodule) Stop ¶
func (networkSubmodule *NetworkSubmodule) Stop(ctx context.Context)