rtvllog

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0, MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTables

func CreateTables(ctx context.Context, db *sql.DB) error

Types

type DTEvent

type DTEvent struct {
	CreatedAt time.Time
	Name      string
	Message   string
}

type MarketEvent

type MarketEvent struct {
	CreatedAt time.Time
	Name      string
	Status    string
	Message   string
}

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

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) Count

func (d *RetrievalLogDB) Count(ctx context.Context) (int, error)

func (*RetrievalLogDB) DeleteOlderThan

func (d *RetrievalLogDB) DeleteOlderThan(ctx context.Context, at time.Time) (int64, error)

func (*RetrievalLogDB) Get

func (d *RetrievalLogDB) Get(ctx context.Context, peerID string, transferID uint64) (*RetrievalDealState, error)

func (*RetrievalLogDB) Insert

func (*RetrievalLogDB) InsertMarketsEvent

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 (*RetrievalLogDB) UpdateDataTransferState

func (d *RetrievalLogDB) UpdateDataTransferState(ctx context.Context, event datatransfer.Event, state datatransfer.ChannelState) error

Jump to

Keyboard shortcuts

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