# Functions
CancelDeal clears a deal that went wrong for an unknown reason.
CleanupDeal runs to do memory cleanup for an in progress deal.
DataTransferSubscriber 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.
Dispatcher will publish a pubsub event cast as Provider event.
TrackTransfer keeps track of a transfer during revalidation.
# Constants
EventBlocksCompleted happens when the provider reads the last block in the piece.
EventBlockSent happens when the provider reads another block in the piece.
EventCancelComplete happens when a deal cancellation is transmitted to the provider.
EventCleanupComplete happens when a deal is finished cleaning up and enters a complete state.
EventClientCancelled happens when the provider gets a cancel message from the client's data transfer.
EventComplete indicates a retrieval deal was completed for a client.
EventDataTransferError emits when something go wrong at the data transfer level.
EventDealAccepted happens when a provider accepts a deal.
EventDealNotFound happens when the provider cannot find the piece for the deal proposed by the client.
EventDealRejected happens when a provider rejects a deal proposed by the client.
EventMultiStoreError occurs when an error happens attempting to operate on the multistore.
EventOpen indicates a new deal was received from a client.
EventPartialPaymentReceived happens when a provider receives and processes a payment that is less than what was requested to proceed with the deal.
EventPaymentReceived happens when a provider receives a payment and resumes processing a deal.
EventPaymentRequested happens when a provider asks for payment from a client for blocks sent.
EventSaveVoucherFailed happens when an attempt to save a payment voucher fails.
EventUnsealComplete emits when the unsealing process is done.
EventUnsealError emits when something wrong occurs while unsealing data.
# Variables
Events is a human readable map of provider event name -> event description.
FinalityStates are the terminal states for a retrieval provider.
FSMEvents is the state chart defining the events that can happen in a retrieval provider it is almost identical to go-fil-markets except we don't have to unseal pieces.
StateEntryFuncs are the handlers for different states in a retrieval provider.
# Structs
InternalEvent wraps a provider event and the associated deal state.
# Interfaces
DealEnvironment is a bridge to the environment a provider deal is executing in.
EventReceiver is any thing that can receive FSM events.
# Type aliases
Event that occurs in a deal lifecycle on the provider.
Subscriber is a callback that is registered to listen for retrieval events on a provider.