network

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0, MIT Imports: 62 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

	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() apiface.INetwork

API create a new network implement

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)

func (*NetworkSubmodule) V0API added in v0.9.7

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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