fchost

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilecoinHost

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

FilecoinHost is a libp2p host connected to the FC network.

func New

func New(network string, bootstrap bool) (*FilecoinHost, error)

New returns a new FilecoinHost.

func (*FilecoinHost) Addrs

func (fc *FilecoinHost) Addrs(pid peer.ID) []multiaddr.Multiaddr

Addrs returns the known multiaddresses known of a peer.

func (*FilecoinHost) Bootstrap

func (fc *FilecoinHost) Bootstrap() error

Bootstrap connects to the bootstrap peers.

func (*FilecoinHost) GetAgentVersion

func (fc *FilecoinHost) GetAgentVersion(pid peer.ID) string

GetAgentVersion returns the agent version of the peer, or empty otherwise.

func (*FilecoinHost) Ping

func (fc *FilecoinHost) Ping(ctx context.Context, pid peer.ID) bool

Ping runs the ping protocol with a peer, returns true on success or false otherwise.

Jump to

Keyboard shortcuts

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