gf_p2p

package
v0.0.0-...-a1b0e2b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLibp2p

func InitLibp2p(pConfig GFp2pConfig,
	pPortInt int,
	pRuntimeSys *gf_core.RuntimeSys) (host.Host, *dht.IpfsDHT)

-------------------------------------------------

func InitShutdownOnSignal

func InitShutdownOnSignal(pNode host.Host)

-------------------------------------------------

func InitStreamHandler

func InitStreamHandler(pNode host.Host,
	pConfig GFp2pConfig,
	pRuntimeSys *gf_core.RuntimeSys)

-------------------------------------------------

func StringsToAddrs

func StringsToAddrs(addrStrings []string) (maddrs []multiaddr.Multiaddr, err error)

-------------------------------------------------

Types

type GFp2pAddrLst

type GFp2pAddrLst []multiaddr.Multiaddr

func (*GFp2pAddrLst) Set

func (al *GFp2pAddrLst) Set(value string) error

-------------------------------------------------

func (*GFp2pAddrLst) String

func (al *GFp2pAddrLst) String() string

-------------------------------------------------

type GFp2pConfig

type GFp2pConfig struct {
	RendezvousSymbolStr string
	BootstrapPeers      GFp2pAddrLst
	ListenAddresses     GFp2pAddrLst
	ProtocolIDstr       string
}

-------------------------------------------------

func ParseFlags

func ParseFlags() (GFp2pConfig, error)

-------------------------------------------------

type GFp2pGetStatusMsg

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

type GFp2pPeerInfo

type GFp2pPeerInfo struct {
	IDstr         string
	MultiaddrsLst []string
}

-------------------------------------------------

type GFp2pPeerInitFun

type GFp2pPeerInitFun func(peer.ID) GFp2pPeerPingFun

type GFp2pPeerPingFun

type GFp2pPeerPingFun func() ping.Result

-------------------------------------------------

type GFp2pStatus

type GFp2pStatus struct {
	RendezvousSymbolStr string
	ProtocolIDstr       string

	// PEERS
	BootstrapPeers []GFp2pPeerInfo
	PeersNumberInt int
	PeersIDsLst    []string

	// DHT
	DHTmodeInt    int
	DHTmodeStr    string
	DHTtestKeyStr string
	DHTtestValStr string

	// SELF
	SelfPeerIDstr          string
	SelfAddrsSerializedLst []string
}

-------------------------------------------------

func GetStatusFromServer

func GetStatusFromServer(pStatusServerCh GFp2pStatusServerCh) GFp2pStatus

-------------------------------------------------

type GFp2pStatusServerCh

type GFp2pStatusServerCh chan GFp2pGetStatusMsg

func Init

func Init(pPortInt int,
	pRuntimeSys *gf_core.RuntimeSys) GFp2pStatusServerCh

-------------------------------------------------

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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