Documentation ¶
Index ¶
- type AskGetter
- type ChainDealManager
- type DealFilterParams
- type DealParams
- type DealPublisher
- type DealResponse
- type DealRetryType
- type DealStatus
- type DealStatusRequest
- type DealStatusResponse
- type IndexProvider
- type PieceAdder
- type ProviderDealState
- type SignatureVerifier
- type StorageAsk
- type Transfer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AskGetter ¶
type AskGetter interface {
GetAsk() *storagemarket.SignedStorageAsk
}
type ChainDealManager ¶
type ChainDealManager interface {
WaitForPublishDeals(ctx context.Context, publishCid cid.Cid, proposal market.DealProposal) (*storagemarket.PublishDealsWaitResult, error)
}
type DealFilterParams ¶
type DealFilterParams struct { DealParams *DealParams SealingPipelineState *sealingpipeline.Status }
type DealParams ¶
type DealParams struct { DealUUID uuid.UUID IsOffline bool ClientDealProposal market.ClientDealProposal DealDataRoot cid.Cid Transfer Transfer // Transfer params will be the zero value if this is an offline deal }
func (*DealParams) MarshalCBOR ¶
func (t *DealParams) MarshalCBOR(w io.Writer) error
func (*DealParams) UnmarshalCBOR ¶
func (t *DealParams) UnmarshalCBOR(r io.Reader) (err error)
type DealPublisher ¶
type DealPublisher interface {
Publish(ctx context.Context, deal market.ClientDealProposal) (cid.Cid, error)
}
type DealResponse ¶
type DealResponse struct { Accepted bool // Message is the reason the deal proposal was rejected. It is empty if // the deal was accepted. Message string }
func (*DealResponse) MarshalCBOR ¶
func (t *DealResponse) MarshalCBOR(w io.Writer) error
func (*DealResponse) UnmarshalCBOR ¶
func (t *DealResponse) UnmarshalCBOR(r io.Reader) (err error)
type DealRetryType ¶
type DealRetryType string
const ( // DealRetryAuto means that when boost restarts, it will automatically // retry the deal DealRetryAuto DealRetryType = "auto" // DealRetryManual means that boost will not automatically retry the // deal, it must be manually retried by the user DealRetryManual DealRetryType = "manual" // DealRetryFatal means that the deal will fail immediately and permanently DealRetryFatal DealRetryType = "fatal" )
type DealStatus ¶
type DealStatus struct { // Error is non-empty if the deal is in the error state Error string // Status is a string corresponding to a deal checkpoint Status string // Proposal is the deal proposal Proposal market.DealProposal // SignedProposalCid is the cid of the client deal proposal + signature SignedProposalCid cid.Cid // PublishCid is the cid of the Publish message sent on chain, if the deal // has reached the publish stage PublishCid *cid.Cid // ChainDealID is the id of the deal in chain state ChainDealID abi.DealID }
func (*DealStatus) MarshalCBOR ¶
func (t *DealStatus) MarshalCBOR(w io.Writer) error
func (*DealStatus) UnmarshalCBOR ¶
func (t *DealStatus) UnmarshalCBOR(r io.Reader) (err error)
type DealStatusRequest ¶
DealStatusRequest is sent to get the current state of a deal from a storage provider
func (*DealStatusRequest) MarshalCBOR ¶
func (t *DealStatusRequest) MarshalCBOR(w io.Writer) error
func (*DealStatusRequest) UnmarshalCBOR ¶
func (t *DealStatusRequest) UnmarshalCBOR(r io.Reader) (err error)
type DealStatusResponse ¶
type DealStatusResponse struct { DealUUID uuid.UUID // Error is non-empty if there is an error getting the deal status // (eg invalid request signature) Error string DealStatus *DealStatus IsOffline bool TransferSize uint64 NBytesReceived uint64 }
DealStatusResponse is the current state of a deal
func (*DealStatusResponse) MarshalCBOR ¶
func (t *DealStatusResponse) MarshalCBOR(w io.Writer) error
func (*DealStatusResponse) UnmarshalCBOR ¶
func (t *DealStatusResponse) UnmarshalCBOR(r io.Reader) (err error)
type IndexProvider ¶
type PieceAdder ¶
type PieceAdder interface {
AddPiece(ctx context.Context, size abi.UnpaddedPieceSize, r io.Reader, d api.PieceDealInfo) (abi.SectorNumber, abi.PaddedPieceSize, error)
}
type ProviderDealState ¶
type ProviderDealState struct { // DealUuid is an unique uuid generated by client for the deal. DealUuid uuid.UUID // CreatedAt is the time at which the deal was stored CreatedAt time.Time // ClientDealProposal is the deal proposal sent by the client. ClientDealProposal market.ClientDealProposal // IsOffline is true for offline deals i.e. deals where the actual data to be stored by the SP is sent out of band // and not via an online data transfer. IsOffline bool // ClientPeerID is the Clients libp2p Peer ID. ClientPeerID peer.ID // DealDataRoot is the root of the IPLD DAG that the client wants to store. DealDataRoot cid.Cid // InboundCARPath is the file-path where the storage provider will persist the CAR file sent by the client. InboundFilePath string // Transfer has the parameters for the data transfer Transfer Transfer // Chain Vars ChainDealID abi.DealID PublishCID *cid.Cid // sector packing info SectorID abi.SectorNumber Offset abi.PaddedPieceSize Length abi.PaddedPieceSize // deal checkpoint in DB. Checkpoint dealcheckpoints.Checkpoint // CheckpointAt is the time at which the deal entered in the last state CheckpointAt time.Time // set if there's an error Err string // if there was an error, indicates whether and how to retry (auto / manual) Retry DealRetryType // NBytesReceived is the number of bytes Received for this deal NBytesReceived int64 }
ProviderDealState is the local state tracked for a deal by the StorageProvider.
func (*ProviderDealState) SignedProposalCid ¶
func (d *ProviderDealState) SignedProposalCid() (cid.Cid, error)
func (*ProviderDealState) String ¶
func (d *ProviderDealState) String() string
type SignatureVerifier ¶
type StorageAsk ¶
type StorageAsk struct { // Price per GiB / Epoch Price abi.TokenAmount VerifiedPrice abi.TokenAmount MinPieceSize abi.PaddedPieceSize MaxPieceSize abi.PaddedPieceSize Miner address.Address }
StorageAsk defines the parameters by which a miner will choose to accept or reject a deal. Note: making a storage deal proposal which matches the miner's ask is a precondition, but not sufficient to ensure the deal is accepted (the storage provider may run its own decision logic).
func (*StorageAsk) MarshalCBOR ¶
func (t *StorageAsk) MarshalCBOR(w io.Writer) error
func (*StorageAsk) UnmarshalCBOR ¶
func (t *StorageAsk) UnmarshalCBOR(r io.Reader) (err error)
type Transfer ¶
type Transfer struct { // The type of transfer eg "http" Type string // An optional ID that can be supplied by the client to identify the deal ClientID string // A byte array containing marshalled data specific to the transfer type // eg a JSON encoded struct { URL: "<url>", Headers: {...} } Params []byte // The size of the data transferred in bytes Size uint64 }
Transfer has the parameters for a data transfer
Directories ¶
Path | Synopsis |
---|---|
Package mock_types is a generated GoMock package.
|
Package mock_types is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.