testing

package
v0.0.0-...-75360cb Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0, MIT Imports: 5 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
	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 (*TestProviderDealEnvironment) DeleteStore

func (te *TestProviderDealEnvironment) DeleteStore(dealID rm.DealID) error

func (*TestProviderDealEnvironment) Node

Node returns a provider node instance

func (*TestProviderDealEnvironment) PrepareBlockstore

func (te *TestProviderDealEnvironment) PrepareBlockstore(ctx context.Context, dealID rm.DealID, pieceCid cid.Cid) error

func (*TestProviderDealEnvironment) ResumeDataTransfer

func (*TestProviderDealEnvironment) TrackTransfer

func (te *TestProviderDealEnvironment) TrackTransfer(deal rm.ProviderDealState) error

func (*TestProviderDealEnvironment) UntrackTransfer

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