testing

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package testing provides test implementations of retieval market interfaces

Index

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 (*TestProviderDealEnvironment) DeleteStore added in v0.5.2

func (te *TestProviderDealEnvironment) DeleteStore(storeID multistore.StoreID) error

func (*TestProviderDealEnvironment) Node

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL