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 ¶
- func ClientDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber
- func ProviderDataTransferSubscriber(deals EventReceiver) datatransfer.Subscriber
- func TransportConfigurer(thisPeer peer.ID, storeGetter StoreGetter) datatransfer.TransportConfigurer
- type EventReceiver
- type StoreConfigurableTransport
- type StoreGetter
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