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: 0

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