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 storage 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(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 StoreGetter ¶
type StoreGetter interface {
Get(proposalCid cid.Cid) (bstore.Blockstore, error)
}
StoreGetter retrieves the store for a given proposal cid