network

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: Apache-2.0, MIT Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNoopLibP2PHost

func NewNoopLibP2PHost() noopLibP2PHost

nolint

Types

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

	Blockstore blockstoreutil.Blockstore
	PeerMgr    net.IPeerMgr
	//data transfer
	DataTransfer     datatransfer.Manager
	DataTransferHost dtnet.DataTransferNetwork
}

NetworkSubmodule enhances the `Node` with networking capabilities.

func NewNetworkSubmodule

func NewNetworkSubmodule(ctx context.Context, 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) Stop

func (networkSubmodule *NetworkSubmodule) Stop(ctx context.Context)

func (*NetworkSubmodule) V0API added in v0.9.7

func (networkSubmodule *NetworkSubmodule) V0API() v0api.INetwork

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL