Documentation ¶
Index ¶
- func HashMsgId(m *pubsub_pb.Message) string
- func NewNoopLibP2PHost() noopLibP2PHost
- type NetworkSubmodule
- func (networkSubmodule *NetworkSubmodule) API() v1api.INetwork
- func (networkSubmodule *NetworkSubmodule) FetchMessagesByCids(ctx context.Context, service bserv.BlockService, cids []cid.Cid) ([]*types.Message, error)
- func (networkSubmodule *NetworkSubmodule) FetchSignedMessagesByCids(ctx context.Context, service bserv.BlockService, cids []cid.Cid) ([]*types.SignedMessage, error)
- func (networkSubmodule *NetworkSubmodule) Start(ctx context.Context) error
- func (networkSubmodule *NetworkSubmodule) Stop(ctx context.Context)
- func (networkSubmodule *NetworkSubmodule) V0API() v0api.INetwork
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NetworkSubmodule ¶
type NetworkSubmodule struct { NetworkName string Host host.Host RawHost types.RawHost // 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 HelloHandler *helloprotocol.HelloProtocolHandler PeerMgr peermgr.IPeerMgr ExchangeClient filexchange.Client // data transfer DataTransfer datatransfer.Manager DataTransferHost dtnet.DataTransferNetwork ScoreKeeper *net.ScoreKeeper // contains filtered or unexported fields }
NetworkSubmodule enhances the `Node` with networking capabilities.
func NewNetworkSubmodule ¶
func NewNetworkSubmodule(ctx context.Context, chainStore *chain.Store, messageStore *chain.MessageStore, config networkConfig, ) (*NetworkSubmodule, error)
NewNetworkSubmodule creates a new network submodule.
func (*NetworkSubmodule) API ¶
func (networkSubmodule *NetworkSubmodule) API() v1api.INetwork
API create a new network implement
func (*NetworkSubmodule) FetchMessagesByCids ¶
func (networkSubmodule *NetworkSubmodule) FetchMessagesByCids( ctx context.Context, service bserv.BlockService, cids []cid.Cid, ) ([]*types.Message, error)
func (*NetworkSubmodule) FetchSignedMessagesByCids ¶
func (networkSubmodule *NetworkSubmodule) FetchSignedMessagesByCids( ctx context.Context, service bserv.BlockService, cids []cid.Cid, ) ([]*types.SignedMessage, error)
func (*NetworkSubmodule) Start ¶ added in v1.7.0
func (networkSubmodule *NetworkSubmodule) Start(ctx context.Context) error
func (*NetworkSubmodule) Stop ¶
func (networkSubmodule *NetworkSubmodule) Stop(ctx context.Context)
func (*NetworkSubmodule) V0API ¶ added in v0.9.7
func (networkSubmodule *NetworkSubmodule) V0API() v0api.INetwork
Click to show internal directories.
Click to hide internal directories.