Documentation ¶
Overview ¶
Package testing provides test implementations of retieval market interfaces
Index ¶
- Variables
- type TestProviderDealEnvironment
- func (te *TestProviderDealEnvironment) CloseDataTransfer(_ context.Context, _ datatransfer.ChannelID) error
- func (te *TestProviderDealEnvironment) DeleteStore(dealID rm.DealID) error
- func (te *TestProviderDealEnvironment) Node() rm.RetrievalProviderNode
- func (te *TestProviderDealEnvironment) PrepareBlockstore(ctx context.Context, dealID rm.DealID, pieceCid cid.Cid) error
- func (te *TestProviderDealEnvironment) ResumeDataTransfer(_ context.Context, _ datatransfer.ChannelID) error
- func (te *TestProviderDealEnvironment) TrackTransfer(deal rm.ProviderDealState) error
- func (te *TestProviderDealEnvironment) UntrackTransfer(deal rm.ProviderDealState) error
Constants ¶
This section is empty.
Variables ¶
View Source
var TrivialTestDecider retrievalimpl.DealDecider = func(_ context.Context, _ rm.ProviderDealState) (bool, string, error) { return true, "", nil }
TrivialTestDecider is a shortest possible DealDecider that accepts all deals
Functions ¶
This section is empty.
Types ¶
type TestProviderDealEnvironment ¶
type TestProviderDealEnvironment struct { ResumeDataTransferError error PrepareBlockstoreError error TrackTransferError error UntrackTransferError error CloseDataTransferError error DeleteStoreError error // contains filtered or unexported fields }
TestProviderDealEnvironment is a test implementation of ProviderDealEnvironment used by the provider state machine.
func NewTestProviderDealEnvironment ¶
func NewTestProviderDealEnvironment(node rm.RetrievalProviderNode) *TestProviderDealEnvironment
NewTestProviderDealEnvironment returns a new TestProviderDealEnvironment instance
func (*TestProviderDealEnvironment) CloseDataTransfer ¶
func (te *TestProviderDealEnvironment) CloseDataTransfer(_ context.Context, _ datatransfer.ChannelID) error
func (*TestProviderDealEnvironment) DeleteStore ¶
func (te *TestProviderDealEnvironment) DeleteStore(dealID rm.DealID) error
func (*TestProviderDealEnvironment) Node ¶
func (te *TestProviderDealEnvironment) Node() rm.RetrievalProviderNode
Node returns a provider node instance
func (*TestProviderDealEnvironment) PrepareBlockstore ¶
func (*TestProviderDealEnvironment) ResumeDataTransfer ¶
func (te *TestProviderDealEnvironment) ResumeDataTransfer(_ context.Context, _ datatransfer.ChannelID) error
func (*TestProviderDealEnvironment) TrackTransfer ¶
func (te *TestProviderDealEnvironment) TrackTransfer(deal rm.ProviderDealState) error
func (*TestProviderDealEnvironment) UntrackTransfer ¶
func (te *TestProviderDealEnvironment) UntrackTransfer(deal rm.ProviderDealState) error
Click to show internal directories.
Click to hide internal directories.