lotus

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIOpener

func NewAPIOpener(cctx *cli.Context, cacheSize int) (*APIOpener, APICloser, error)

Types

type API

type API interface {
	StartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error)
	Import(ctx context.Context, ref api.FileRef) (*api.ImportRes, error)
	QueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error)
	ChainHead(ctx context.Context) (*types.TipSet, error)
	MinerInfo(ctx context.Context, a address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
	DealPieceCID(ctx context.Context, root cid.Cid) (api.DataCIDSize, error)
	GetDealUpdates(ctx context.Context) (<-chan api.DealInfo, error)
}

type APICloser

type APICloser func()

type APIOpener

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

func (*APIOpener) Open

func (o *APIOpener) Open(ctx context.Context) (API, APICloser, error)

type APIWrapper

type APIWrapper struct {
	api.FullNode
	// contains filtered or unexported fields
}

func NewAPIWrapper

func NewAPIWrapper(node api.FullNode, store adt.Store) *APIWrapper

func (*APIWrapper) ChainHead

func (aw *APIWrapper) ChainHead(ctx context.Context) (*types.TipSet, error)

func (*APIWrapper) DealPieceCID

func (aw *APIWrapper) DealPieceCID(ctx context.Context, root cid.Cid) (api.DataCIDSize, error)

func (*APIWrapper) GetDealUpdates

func (aw *APIWrapper) GetDealUpdates(ctx context.Context) (<-chan api.DealInfo, error)

func (*APIWrapper) Import

func (aw *APIWrapper) Import(ctx context.Context, ref api.FileRef) (*api.ImportRes, error)

func (*APIWrapper) MinerInfo

func (aw *APIWrapper) MinerInfo(ctx context.Context, a address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)

func (*APIWrapper) QueryAsk

func (aw *APIWrapper) QueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error)

func (*APIWrapper) StartDeal

func (aw *APIWrapper) StartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error)

func (*APIWrapper) Store

func (aw *APIWrapper) Store() adt.Store

type CacheCtxStore

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

func NewCacheCtxStore

func NewCacheCtxStore(ctx context.Context, api api.FullNode, cache *lru.ARCCache) (*CacheCtxStore, error)

func (*CacheCtxStore) Context

func (cs *CacheCtxStore) Context() context.Context

func (*CacheCtxStore) Get

func (cs *CacheCtxStore) Get(ctx context.Context, c cid.Cid, out interface{}) error

func (*CacheCtxStore) Put

func (cs *CacheCtxStore) Put(ctx context.Context, v interface{}) (cid.Cid, error)

Jump to

Keyboard shortcuts

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