peerinfo

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerInfo

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

func New

func New(tcpNode host.Host, peers []peer.ID, version string, lockHash []byte, gitHash string,
	sendFunc p2p.SendReceiveFunc,
) *PeerInfo

New returns a new peer info protocol instance.

func NewForT

func NewForT(_ *testing.T, tcpNode host.Host, peers []peer.ID, version string, lockHash []byte, gitHash string,
	sendFunc p2p.SendReceiveFunc, registerHandler p2p.RegisterHandlerFunc,
	tickerProvider tickerProvider, nowFunc nowFunc, metricSubmitter metricSubmitter,
) *PeerInfo

NewForT returns a new peer info protocol instance for testing only.

func (*PeerInfo) Run

func (p *PeerInfo) Run(ctx context.Context)

Run runs the peer info protocol until the context is cancelled.

Directories

Path Synopsis
peerinfopb
v1

Jump to

Keyboard shortcuts

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