Documentation ¶
Index ¶
- type AskGetter
- type ChainDealManager
- type CommpCalculator
- type ContractParamsVersion1
- type DealParams
- type DealParamsV120
- 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 CommpCalculator ¶ added in v1.4.0
type ContractParamsVersion1 ¶ added in v1.6.0
type ContractParamsVersion1 struct { LocationRef string CarSize uint64 SkipIpniAnnounce bool RemoveUnsealedCopy bool }
func (*ContractParamsVersion1) MarshalCBOR ¶ added in v1.6.0
func (t *ContractParamsVersion1) MarshalCBOR(w io.Writer) error
func (*ContractParamsVersion1) UnmarshalCBOR ¶ added in v1.6.0
func (t *ContractParamsVersion1) UnmarshalCBOR(r io.Reader) (err error)
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 RemoveUnsealedCopy bool SkipIPNIAnnounce bool }
func (*DealParams) MarshalCBOR ¶
func (t *DealParams) MarshalCBOR(w io.Writer) error
func (*DealParams) UnmarshalCBOR ¶
func (t *DealParams) UnmarshalCBOR(r io.Reader) (err error)
type DealParamsV120 ¶ added in v1.5.1
type DealParamsV120 struct { DealUUID uuid.UUID IsOffline bool ClientDealProposal market.ClientDealProposal DealDataRoot cid.Cid Transfer Transfer }
func (*DealParamsV120) MarshalCBOR ¶ added in v1.5.1
func (t *DealParamsV120) MarshalCBOR(w io.Writer) error
func (*DealParamsV120) UnmarshalCBOR ¶ added in v1.5.1
func (t *DealParamsV120) 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 // SealingStatus is the sealing status reported by lotus miner SealingStatus 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 // CleanupData indicates whether to remove the data for a deal after the deal has been added to a sector. // This is always true for online deals, and can be set as a flag for offline deals. CleanupData 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 // Keep unsealed copy of the data FastRetrieval bool //Announce deal to the IPNI(Index Provider) AnnounceToIPNI bool }
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
Source Files ¶
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.