Documentation ¶
Index ¶
- func CreateTables(ctx context.Context, db *sql.DB) error
- type DTEvent
- type MarketEvent
- type RetrievalDealState
- type RetrievalLog
- func (r *RetrievalLog) OnDataTransferEvent(event datatransfer.Event, state datatransfer.ChannelState)
- func (r *RetrievalLog) OnQueryEvent(evt retrievalmarket.ProviderQueryEvent)
- func (r *RetrievalLog) OnRetrievalEvent(event retrievalmarket.ProviderEvent, state retrievalmarket.ProviderDealState)
- func (r *RetrievalLog) OnValidationEvent(evt retrievalmarket.ProviderValidationEvent)
- func (r *RetrievalLog) Start(ctx context.Context)
- type RetrievalLogDB
- func (d *RetrievalLogDB) Count(ctx context.Context) (int, error)
- func (d *RetrievalLogDB) DeleteOlderThan(ctx context.Context, at time.Time) (int64, error)
- func (d *RetrievalLogDB) Get(ctx context.Context, peerID string, transferID uint64) (*RetrievalDealState, error)
- func (d *RetrievalLogDB) Insert(ctx context.Context, l *RetrievalDealState) error
- func (d *RetrievalLogDB) InsertMarketsEvent(ctx context.Context, event retrievalmarket.ProviderEvent, ...) error
- func (d *RetrievalLogDB) List(ctx context.Context, cursor *uint64, offset int, limit int) ([]RetrievalDealState, error)
- func (d *RetrievalLogDB) ListDTEvents(ctx context.Context, peerID string, transferID datatransfer.TransferID) ([]DTEvent, error)
- func (d *RetrievalLogDB) ListLastUpdatedAndOpen(ctx context.Context, lastUpdated time.Time) ([]RetrievalDealState, error)
- func (d *RetrievalLogDB) ListMarketEvents(ctx context.Context, peerID string, dealID retrievalmarket.DealID) ([]MarketEvent, error)
- func (d *RetrievalLogDB) Update(ctx context.Context, state retrievalmarket.ProviderDealState) error
- func (d *RetrievalLogDB) UpdateDataTransferState(ctx context.Context, event datatransfer.Event, state datatransfer.ChannelState) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MarketEvent ¶
type RetrievalDealState ¶
type RetrievalDealState struct { RowID uint64 CreatedAt time.Time UpdatedAt time.Time LocalPeerID peer.ID PeerID peer.ID DealID retrievalmarket.DealID TransferID datatransfer.TransferID PayloadCID cid.Cid PieceCID *cid.Cid PaymentInterval uint64 PaymentIntervalIncrease uint64 PricePerByte abi.TokenAmount UnsealPrice abi.TokenAmount Status string Message string TotalSent uint64 DTStatus string DTMessage string }
type RetrievalLog ¶
type RetrievalLog struct {
// contains filtered or unexported fields
}
func NewRetrievalLog ¶
func NewRetrievalLog(db *RetrievalLogDB, duration time.Duration, dt dtypes.ProviderDataTransfer, stalledTimeout time.Duration, gsur *server.GraphsyncUnpaidRetrieval) *RetrievalLog
func (*RetrievalLog) OnDataTransferEvent ¶
func (r *RetrievalLog) OnDataTransferEvent(event datatransfer.Event, state datatransfer.ChannelState)
Called when there is an event from the data-transfer subsystem
func (*RetrievalLog) OnQueryEvent ¶
func (r *RetrievalLog) OnQueryEvent(evt retrievalmarket.ProviderQueryEvent)
Called when there is a retrieval ask query
func (*RetrievalLog) OnRetrievalEvent ¶
func (r *RetrievalLog) OnRetrievalEvent(event retrievalmarket.ProviderEvent, state retrievalmarket.ProviderDealState)
Called when there is a markets event
func (*RetrievalLog) OnValidationEvent ¶
func (r *RetrievalLog) OnValidationEvent(evt retrievalmarket.ProviderValidationEvent)
Called when there is a validation event. This occurs when the client makes a graphsync retrieval request, and the Storage Provider validates the request (eg checking its parameters for validity, checking for acceptance against the retrieval filter, etc)
func (*RetrievalLog) Start ¶
func (r *RetrievalLog) Start(ctx context.Context)
type RetrievalLogDB ¶
type RetrievalLogDB struct {
// contains filtered or unexported fields
}
func NewRetrievalLogDB ¶
func NewRetrievalLogDB(db *sql.DB) *RetrievalLogDB
func (*RetrievalLogDB) DeleteOlderThan ¶
func (*RetrievalLogDB) Get ¶
func (d *RetrievalLogDB) Get(ctx context.Context, peerID string, transferID uint64) (*RetrievalDealState, error)
func (*RetrievalLogDB) Insert ¶
func (d *RetrievalLogDB) Insert(ctx context.Context, l *RetrievalDealState) error
func (*RetrievalLogDB) InsertMarketsEvent ¶
func (d *RetrievalLogDB) InsertMarketsEvent(ctx context.Context, event retrievalmarket.ProviderEvent, state retrievalmarket.ProviderDealState) error
func (*RetrievalLogDB) List ¶
func (d *RetrievalLogDB) List(ctx context.Context, cursor *uint64, offset int, limit int) ([]RetrievalDealState, error)
func (*RetrievalLogDB) ListDTEvents ¶
func (d *RetrievalLogDB) ListDTEvents(ctx context.Context, peerID string, transferID datatransfer.TransferID) ([]DTEvent, error)
func (*RetrievalLogDB) ListLastUpdatedAndOpen ¶ added in v1.5.3
func (d *RetrievalLogDB) ListLastUpdatedAndOpen(ctx context.Context, lastUpdated time.Time) ([]RetrievalDealState, error)
func (*RetrievalLogDB) ListMarketEvents ¶
func (d *RetrievalLogDB) ListMarketEvents(ctx context.Context, peerID string, dealID retrievalmarket.DealID) ([]MarketEvent, error)
func (*RetrievalLogDB) Update ¶
func (d *RetrievalLogDB) Update(ctx context.Context, state retrievalmarket.ProviderDealState) error
func (*RetrievalLogDB) UpdateDataTransferState ¶
func (d *RetrievalLogDB) UpdateDataTransferState(ctx context.Context, event datatransfer.Event, state datatransfer.ChannelState) error
Click to show internal directories.
Click to hide internal directories.