simconnlibp2p

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const OneMbps = 1_000_000

Variables

This section is empty.

Functions

func MustNewHost

func MustNewHost(t *testing.T, opts ...libp2p.Option) host.Host

func QUICSimnet

func QUICSimnet(simnet *simnet.Simnet, linkSettings simnet.NodeBiDiLinkSettings, quicReuseOpts ...quicreuse.Option) libp2p.Option

Types

type BlankHostOpts

type BlankHostOpts struct {
	ConnMgr *connmgr.BasicConnMgr
	// contains filtered or unexported fields
}

type HostAndIdx

type HostAndIdx struct {
	Host host.Host
	Idx  int
}

type MockSourceIPSelector

type MockSourceIPSelector struct {
	// contains filtered or unexported fields
}

func (*MockSourceIPSelector) PreferredSourceIPForDestination

func (m *MockSourceIPSelector) PreferredSourceIPForDestination(_ *net.UDPAddr) (net.IP, error)

type NetworkSettings

type NetworkSettings struct {
	UseBlankHost            bool
	QUICReuseOptsForHostIdx func(idx int) []quicreuse.Option
	BlankHostOptsForHostIdx func(idx int) BlankHostOpts
}

type NodeLinkSettingsAndCount

type NodeLinkSettingsAndCount struct {
	LinkSettings simnet.NodeBiDiLinkSettings
	Count        int
}

type SimpleLibp2pNetworkMeta

type SimpleLibp2pNetworkMeta struct {
	Nodes      []host.Host
	AddrToNode map[string]HostAndIdx
}

func SimpleLibp2pNetwork

func SimpleLibp2pNetwork(linkSettings []NodeLinkSettingsAndCount, networkSettings NetworkSettings) (*simnet.Simnet, *SimpleLibp2pNetworkMeta, error)

Jump to

Keyboard shortcuts

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