client

package
v0.0.0-...-484cccf Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0, MIT Imports: 69 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDAGStoreDir = "dagstore"

Variables

View Source
var DefaultHashFunction = unixfs.DefaultHashFunction

Functions

This section is empty.

Types

type API

type API struct {
	fx.In

	full.ChainAPI
	full.WalletAPI
	paych.PaychAPI
	full.StateAPI

	SMDealClient storagemarket.StorageClient
	RetDiscovery discovery.PeerResolver
	Retrieval    rm.RetrievalClient
	Chain        *store.ChainStore

	// accessors for imports and retrievals.
	Imports                   dtypes.ClientImportMgr
	StorageBlockstoreAccessor storagemarket.BlockstoreAccessor
	RtvlBlockstoreAccessor    rm.BlockstoreAccessor
	ApiBlockstoreAccessor     *retrievaladapter.APIBlockstoreAccessor

	DataTransfer dtypes.ClientDataTransfer
	Host         host.Host

	Repo repo.LockedRepo
}

func (*API) ClientCalcCommP

func (a *API) ClientCalcCommP(ctx context.Context, inpath string) (*api.CommPRet, error)

func (*API) ClientCancelDataTransfer

func (a *API) ClientCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error

func (*API) ClientCancelRetrievalDeal

func (a *API) ClientCancelRetrievalDeal(ctx context.Context, dealID rm.DealID) error

func (*API) ClientDataTransferUpdates

func (a *API) ClientDataTransferUpdates(ctx context.Context) (<-chan api.DataTransferChannel, error)

func (*API) ClientDealPieceCID

func (a *API) ClientDealPieceCID(ctx context.Context, root cid.Cid) (api.DataCIDSize, error)

func (*API) ClientDealSize

func (a *API) ClientDealSize(ctx context.Context, root cid.Cid) (api.DataSize, error)

func (*API) ClientExport

func (a *API) ClientExport(ctx context.Context, exportRef api.ExportRef, ref api.FileRef) error

func (*API) ClientExportInto

func (a *API) ClientExportInto(ctx context.Context, exportRef api.ExportRef, car bool, dest ExportDest) error

func (*API) ClientFindData

func (a *API) ClientFindData(ctx context.Context, root cid.Cid, piece *cid.Cid) ([]api.QueryOffer, error)

func (*API) ClientGenCar

func (a *API) ClientGenCar(ctx context.Context, ref api.FileRef, outputPath string) error

func (*API) ClientGetDealInfo

func (a *API) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo, error)

func (*API) ClientGetDealStatus

func (a *API) ClientGetDealStatus(ctx context.Context, statusCode uint64) (string, error)

func (*API) ClientGetDealUpdates

func (a *API) ClientGetDealUpdates(ctx context.Context) (<-chan api.DealInfo, error)

func (*API) ClientGetRetrievalUpdates

func (a *API) ClientGetRetrievalUpdates(ctx context.Context) (<-chan api.RetrievalInfo, error)

func (*API) ClientHasLocal

func (a *API) ClientHasLocal(_ context.Context, root cid.Cid) (bool, error)

func (*API) ClientImport

func (a *API) ClientImport(ctx context.Context, ref api.FileRef) (res *api.ImportRes, err error)

func (*API) ClientImportLocal

func (a *API) ClientImportLocal(ctx context.Context, r io.Reader) (cid.Cid, error)

ClientImportLocal imports a standard file into this node as a UnixFS payload, storing it in a CARv2 file. Note that this method is NOT integrated with the IPFS blockstore. That is, if client-side IPFS integration is enabled, this method won't import the file into that

func (*API) ClientListDataTransfers

func (a *API) ClientListDataTransfers(ctx context.Context) ([]api.DataTransferChannel, error)

func (*API) ClientListDeals

func (a *API) ClientListDeals(ctx context.Context) ([]api.DealInfo, error)

func (*API) ClientListImports

func (a *API) ClientListImports(_ context.Context) ([]api.Import, error)

func (*API) ClientListRetrievals

func (a *API) ClientListRetrievals(ctx context.Context) ([]api.RetrievalInfo, error)

func (*API) ClientMinerQueryOffer

func (a *API) ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (api.QueryOffer, error)

func (*API) ClientQueryAsk

func (a *API) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*api.StorageAsk, error)

func (*API) ClientRemoveImport

func (a *API) ClientRemoveImport(ctx context.Context, id imports.ID) error

func (*API) ClientRestartDataTransfer

func (a *API) ClientRestartDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error

func (*API) ClientRetrieve

func (a *API) ClientRetrieve(ctx context.Context, params api.RetrievalOrder) (*api.RestrievalRes, error)

func (*API) ClientRetrieveTryRestartInsufficientFunds

func (a *API) ClientRetrieveTryRestartInsufficientFunds(ctx context.Context, paymentChannel address.Address) error

func (*API) ClientRetrieveWait

func (a *API) ClientRetrieveWait(ctx context.Context, deal rm.DealID) error

func (*API) ClientStartDeal

func (a *API) ClientStartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error)

func (*API) ClientStatelessDeal

func (a *API) ClientStatelessDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error)

type CarHeader

type CarHeader struct {
	Roots   []cid.Cid
	Version uint64
}

type ExportDest

type ExportDest struct {
	Writer io.Writer
	Path   string
}

Jump to

Keyboard shortcuts

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