powergate: github.com/textileio/powergate/index/miner/module Index | Files

package module

import "github.com/textileio/powergate/index/miner/module"


Package Files

meta.go metrics.go miner.go onchain.go

type Index Uses

type Index struct {
    // contains filtered or unexported fields

Index builds and provides information about FC miners.

func New Uses

func New(ds datastore.TxnDatastore, clientBuilder lotus.ClientBuilder, h P2PHost, lr iplocation.LocationResolver) (*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 Uses

func (mi *Index) Close() error

Close closes a MinerIndex.

func (*Index) Get Uses

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

Get returns a copy of the current index information.

func (*Index) Listen Uses

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

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

func (*Index) Unregister Uses

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

Unregister unregisters a channel signaler from the signaler hub.

type P2PHost Uses

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.

Package module imports 22 packages (graph) and is imported by 9 packages. Updated 2020-09-21. Refresh now. Tools for package owners.