module

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 22 Imported by: 0 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 Index

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

Index builds and provides information about FC miners.

func New

func New(ds datastore.TxnDatastore, clientBuilder lotus.ClientBuilder, h P2PHost, lr iplocation.LocationResolver, runOnStart, disable bool) (*Index, error)

New returns a new MinerIndex. It loads from ds any previous state and starts immediately making the index up to date.

func (*Index) Close

func (mi *Index) Close() error

Close closes a MinerIndex.

func (*Index) Get

func (mi *Index) Get() miner.IndexSnapshot

Get returns a copy of the current index information.

func (*Index) Listen

func (mi *Index) Listen() <-chan struct{}

Listen returns a channel signaler to notify when new index information is available.

func (*Index) Unregister

func (mi *Index) Unregister(c chan struct{})

Unregister unregisters a channel signaler from the signaler hub.

type P2PHost

type P2PHost interface {
	Addrs(pid peer.ID) []multiaddr.Multiaddr
	Ping(ctx context.Context, pid peer.ID) bool
	GetAgentVersion(pid peer.ID) string
}

P2PHost provides a client to connect to a libp2p peer.

Jump to

Keyboard shortcuts

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