filapi

package
v0.0.0-...-269d6e4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilAPI

type FilAPI interface {
	ChainHead(context.Context) (*types.TipSet, error)
	StateSearchMsg(context.Context, cid.Cid) (*api.MsgLookup, error)
	ChainGetMessage(context.Context, cid.Cid) (*types.Message, error)
	StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*api.MarketDeal, error)
	StateDealProviderCollateralBounds(context.Context, abi.PaddedPieceSize, bool,
		types.TipSetKey) (api.DealCollateralBounds, error)
	StateMinerInfo(context.Context, address.Address, types.TipSetKey) (miner.MinerInfo, error)
	NetFindPeer(context.Context, peer.ID) (peer.AddrInfo, error)
}

FilAPI contains the minimum set of Filecoin network API used by fil client.

func Measured

func Measured(api FilAPI, collector MetricsCollector) FilAPI

Measured wraps FilAPI to measure the number and duration of each API calls.

type MetricsCollector

type MetricsCollector func(ctx context.Context, methodName string, err error, duration time.Duration)

MetricsCollector is how the FilAPI metrics are collected.

Jump to

Keyboard shortcuts

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