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(storeID multistore.StoreID) error
- func (te *TestProviderDealEnvironment) Node() rm.RetrievalProviderNode
- func (te *TestProviderDealEnvironment) ReadIntoBlockstore(storeID multistore.StoreID, pieceData io.Reader) 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 ReadIntoBlockstoreError 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 ¶ added in v0.5.0
func (te *TestProviderDealEnvironment) CloseDataTransfer(_ context.Context, _ datatransfer.ChannelID) error
func (*TestProviderDealEnvironment) DeleteStore ¶ added in v0.5.2
func (te *TestProviderDealEnvironment) DeleteStore(storeID multistore.StoreID) error
func (*TestProviderDealEnvironment) Node ¶
func (te *TestProviderDealEnvironment) Node() rm.RetrievalProviderNode
Node returns a provider node instance
func (*TestProviderDealEnvironment) ReadIntoBlockstore ¶ added in v0.5.0
func (te *TestProviderDealEnvironment) ReadIntoBlockstore(storeID multistore.StoreID, pieceData io.Reader) error
func (*TestProviderDealEnvironment) ResumeDataTransfer ¶ added in v0.5.0
func (te *TestProviderDealEnvironment) ResumeDataTransfer(_ context.Context, _ datatransfer.ChannelID) error
func (*TestProviderDealEnvironment) TrackTransfer ¶ added in v0.5.0
func (te *TestProviderDealEnvironment) TrackTransfer(deal rm.ProviderDealState) error
func (*TestProviderDealEnvironment) UntrackTransfer ¶ added in v0.5.0
func (te *TestProviderDealEnvironment) UntrackTransfer(deal rm.ProviderDealState) error
Click to show internal directories.
Click to hide internal directories.