Documentation ¶
Index ¶
Constants ¶
View Source
const ( Accepted = iota Error Rejected Unsealing )
View Source
const ProtocolID = "/fil/retrieval/-1.0.0" // TODO: spec
View Source
const QueryProtocolID = "/fil/retrieval/qry/-1.0.0" // TODO: spec
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockVerifier ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Query ¶
func (c *Client) Query(ctx context.Context, p discovery.RetrievalPeer, data cid.Cid) api.QueryOffer
func (*Client) RetrieveUnixfs ¶
func (c *Client) RetrieveUnixfs(ctx context.Context, root cid.Cid, size uint64, total types.BigInt, miner peer.ID, client, minerAddr address.Address, out io.Writer) error
C > S
Offset MUST be aligned on chunking boundaries, size is rounded up to leaf size ¶
> DealProposal{Mode: Unixfs0, RootCid, Offset, Size, Payment(nil if free)} < Resp{Accept} < ..(Intermediate Block) < ..Blocks < ..(Intermediate Block) < ..Blocks > DealProposal(...) < ...
type DealProposal ¶
type DealProposal struct { Payment api.PaymentInfo Ref cid.Cid Params RetParams }
func (*DealProposal) MarshalCBOR ¶
func (t *DealProposal) MarshalCBOR(w io.Writer) error
func (*DealProposal) UnmarshalCBOR ¶
func (t *DealProposal) UnmarshalCBOR(r io.Reader) error
type DealResponse ¶
func (*DealResponse) MarshalCBOR ¶
func (t *DealResponse) MarshalCBOR(w io.Writer) error
func (*DealResponse) UnmarshalCBOR ¶
func (t *DealResponse) UnmarshalCBOR(r io.Reader) error
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
func NewMiner ¶
func NewMiner(sblks *sectorblocks.SectorBlocks, full api.FullNode) *Miner
func (*Miner) HandleDealStream ¶
func (*Miner) HandleQueryStream ¶
type OptimisticVerifier ¶
type OptimisticVerifier struct { }
type QueryResponse ¶
type QueryResponse struct { Status QueryResponseStatus Size uint64 // TODO: spec // TODO: unseal price (+spec) // TODO: sectors to unseal // TODO: address to send money for the deal? MinPrice types.BigInt }
func (*QueryResponse) MarshalCBOR ¶
func (t *QueryResponse) MarshalCBOR(w io.Writer) error
func (*QueryResponse) UnmarshalCBOR ¶
func (t *QueryResponse) UnmarshalCBOR(r io.Reader) error
type QueryResponseStatus ¶
type QueryResponseStatus uint64
const ( Available QueryResponseStatus = iota )
type RetParams ¶
type RetParams struct {
Unixfs0 *Unixfs0Offer
}
type RetrMinerApi ¶
type UnixFs0Verifier ¶
type UnixFs0Verifier struct { Root cid.Cid // contains filtered or unexported fields }
type Unixfs0Offer ¶
func (*Unixfs0Offer) MarshalCBOR ¶
func (t *Unixfs0Offer) MarshalCBOR(w io.Writer) error
func (*Unixfs0Offer) UnmarshalCBOR ¶
func (t *Unixfs0Offer) UnmarshalCBOR(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.