dtutils

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package dtutils provides event listeners for the client and provider to listen for events on the data transfer module and dispatch FSM events based on them

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientDataTransferSubscriber

func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber

ClientDataTransferSubscriber is the function called when an event occurs in a data transfer initiated on the client -- it reads the voucher to verify this even occurred in a retrieval market deal, then, based on the data transfer event that occurred, it dispatches an event to the appropriate state machine

func ProviderDataTransferSubscriber

func ProviderDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber

ProviderDataTransferSubscriber is the function called when an event occurs in a data transfer received by a provider -- it reads the voucher to verify this event occurred in a storage market deal, then, based on the data transfer event that occurred, it generates and update message for the deal -- either moving to staged for a completion event or moving to error if a data transfer error occurs

func TransportConfigurer

func TransportConfigurer(thisPeer peer.ID, storeGetter StoreGetter) datatransfer.TransportConfigurer

TransportConfigurer configurers the graphsync transport to use a custom blockstore per deal

Types

type EventReceiver

type EventReceiver interface {
	Send(id interface{}, name fsm.EventName, args ...interface{}) (err error)
}

EventReceiver is any thing that can receive FSM events

type StoreConfigurableTransport

type StoreConfigurableTransport interface {
	UseStore(datatransfer.ChannelID, ipld.Loader, ipld.Storer) error
}

StoreConfigurableTransport defines the methods needed to configure a data transfer transport use a unique store for a given request

type StoreGetter

type StoreGetter interface {
	Get(otherPeer peer.ID, dealID rm.DealID) (*multistore.Store, error)
}

StoreGetter retrieves the store for a given proposal cid

Jump to

Keyboard shortcuts

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