Documentation ¶
Index ¶
- Constants
- Variables
- func RetrievalProposalForAsk(ask *retrievalmarket.QueryResponse, c cid.Cid, optionalSelector ipld.Node) (*retrievalmarket.DealProposal, error)
- type Client
- func (c *Client) ConnectToMiner(ctx context.Context, maddr address.Address) (peer.ID, error)
- func (c *Client) MinerPeer(ctx context.Context, miner address.Address) (peer.AddrInfo, error)
- func (c *Client) RetrievalQuery(ctx context.Context, maddr address.Address, pcid cid.Cid) (*retrievalmarket.QueryResponse, error)
- func (c *Client) RetrieveContentWithProgressCallback(ctx context.Context, miner address.Address, ...) (*RetrievalStats, error)
- type Config
- type RetrievalStats
Constants ¶
View Source
const (
RetrievalQueryProtocol = "/fil/retrieval/qry/1.0.0"
)
Variables ¶
View Source
var (
Tracer = otel.Tracer("retrieve-client")
)
Functions ¶
func RetrievalProposalForAsk ¶
func RetrievalProposalForAsk(ask *retrievalmarket.QueryResponse, c cid.Cid, optionalSelector ipld.Node) (*retrievalmarket.DealProposal, error)
Types ¶
type Client ¶
type Client struct { ClientAddr address.Address // contains filtered or unexported fields }
func NewClient ¶
func NewClient(h host.Host, api api.Gateway, w *wallet.LocalWallet, addr address.Address, bs blockstore.Blockstore, ds datastore.Batching, ddir string, opts ...func(*Config)) (*Client, error)
func NewClientWithConfig ¶
func (*Client) ConnectToMiner ¶
func (*Client) RetrievalQuery ¶
func (c *Client) RetrievalQuery(ctx context.Context, maddr address.Address, pcid cid.Cid) (*retrievalmarket.QueryResponse, error)
func (*Client) RetrieveContentWithProgressCallback ¶
func (c *Client) RetrieveContentWithProgressCallback( ctx context.Context, miner address.Address, proposal *retrievalmarket.DealProposal, progressCallback func(bytesReceived uint64), ) (*RetrievalStats, error)
type Config ¶
type Config struct { DataDir string GraphsyncOpts []gsimpl.Option Api api.Gateway Wallet *wallet.LocalWallet Addr address.Address Blockstore blockstore.Blockstore Datastore datastore.Batching Host host.Host ChannelMonitorConfig channelmonitor.Config RetrievalConfigurer datatransfer.TransportConfigurer LogRetrievalProgressEvents bool }
type RetrievalStats ¶
Click to show internal directories.
Click to hide internal directories.