Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAllBoostTables(ctx context.Context, mainDB *sql.DB, logsDB *sql.DB) error
- func CreateTestTmpDB(t *testing.T) *sql.DB
- func GenerateDeals() ([]types.ProviderDealState, error)
- func GenerateNDeals(count int) ([]types.ProviderDealState, error)
- func SqlBackup(ctx context.Context, srcDB *sql.DB, dstDir, dbFileName string) error
- func SqlDB(dbPath string) (*sql.DB, error)
- type DealLog
- type DealsDB
- func (d *DealsDB) ByID(ctx context.Context, id uuid.UUID) (*types.ProviderDealState, error)
- func (d *DealsDB) ByPieceCID(ctx context.Context, pieceCid cid.Cid) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ByPublishCID(ctx context.Context, publishCid string) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ByRootPayloadCID(ctx context.Context, payloadCid cid.Cid) ([]*types.ProviderDealState, error)
- func (d *DealsDB) BySectorID(ctx context.Context, sectorID abi.SectorID) ([]*types.ProviderDealState, error)
- func (d *DealsDB) BySignedProposalCID(ctx context.Context, proposalCid cid.Cid) (*types.ProviderDealState, error)
- func (d *DealsDB) Count(ctx context.Context, query string, filter *FilterOptions) (int, error)
- func (d *DealsDB) Insert(ctx context.Context, deal *types.ProviderDealState) error
- func (d *DealsDB) List(ctx context.Context, query string, filter *FilterOptions, cursor *graphql.ID, ...) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ListActive(ctx context.Context) ([]*types.ProviderDealState, error)
- func (d *DealsDB) ListCompleted(ctx context.Context) ([]*types.ProviderDealState, error)
- func (d *DealsDB) Update(ctx context.Context, deal *types.ProviderDealState) error
- type FilterOptions
- type FundsDB
- func (f *FundsDB) InsertLog(ctx context.Context, logs ...*FundsLog) error
- func (f *FundsDB) Logs(ctx context.Context, cursor *time.Time, offset int, limit int) ([]FundsLog, error)
- func (f *FundsDB) LogsCount(ctx context.Context) (int, error)
- func (f *FundsDB) Tag(ctx context.Context, dealUuid uuid.UUID, collateral abi.TokenAmount, ...) error
- func (f *FundsDB) TotalTagged(ctx context.Context) (*TotalTagged, error)
- func (f *FundsDB) Untag(ctx context.Context, dealUuid uuid.UUID) (clt abi.TokenAmount, pub abi.TokenAmount, e error)
- type FundsLog
- type LogsDB
- type ProposalLog
- type ProposalLogsDB
- func (p *ProposalLogsDB) Count(ctx context.Context, accepted *bool) (int, error)
- func (p *ProposalLogsDB) DeleteOlderThan(ctx context.Context, at time.Time) (int64, error)
- func (p *ProposalLogsDB) InsertLog(ctx context.Context, deal types.DealParams, accepted bool, reason string) error
- func (p *ProposalLogsDB) List(ctx context.Context, accepted *bool, cursor *time.Time, offset int, limit int) ([]ProposalLog, error)
- type Scannable
- type SealState
- type SectorState
- type SectorStateDB
- type StorageDB
- func (s *StorageDB) InsertLog(ctx context.Context, logs ...*StorageLog) error
- func (s *StorageDB) Logs(ctx context.Context) ([]StorageLog, error)
- func (s *StorageDB) Tag(ctx context.Context, dealUuid uuid.UUID, size uint64, host string) error
- func (s *StorageDB) TotalTagged(ctx context.Context) (uint64, error)
- func (s *StorageDB) TotalTaggedForHost(ctx context.Context, host string) (uint64, error)
- func (s *StorageDB) Untag(ctx context.Context, dealUuid uuid.UUID) (uint64, error)
- type StorageLog
- type TotalTagged
Constants ¶
View Source
const DealsDBName = "boost.db"
View Source
const LogsDBName = "boost.logs.db"
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func CreateAllBoostTables ¶
func GenerateDeals ¶
func GenerateDeals() ([]types.ProviderDealState, error)
func GenerateNDeals ¶ added in v1.4.0
func GenerateNDeals(count int) ([]types.ProviderDealState, error)
Types ¶
type DealsDB ¶
type DealsDB struct {
// contains filtered or unexported fields
}
func NewDealsDB ¶
func (*DealsDB) ByPieceCID ¶ added in v1.2.0
func (*DealsDB) ByPublishCID ¶
func (*DealsDB) ByRootPayloadCID ¶ added in v1.2.0
func (*DealsDB) BySectorID ¶ added in v1.7.0
func (*DealsDB) BySignedProposalCID ¶
func (*DealsDB) List ¶
func (d *DealsDB) List(ctx context.Context, query string, filter *FilterOptions, cursor *graphql.ID, offset int, limit int) ([]*types.ProviderDealState, error)
func (*DealsDB) ListActive ¶
func (*DealsDB) ListCompleted ¶
type FilterOptions ¶ added in v1.5.1
type FundsDB ¶
type FundsDB struct {
// contains filtered or unexported fields
}
func NewFundsDB ¶
func (*FundsDB) Tag ¶
func (f *FundsDB) Tag(ctx context.Context, dealUuid uuid.UUID, collateral abi.TokenAmount, pubMsg abi.TokenAmount) error
func (*FundsDB) TotalTagged ¶
func (f *FundsDB) TotalTagged(ctx context.Context) (*TotalTagged, error)
type LogsDB ¶
type LogsDB struct {
// contains filtered or unexported fields
}
func (*LogsDB) CleanupLogs ¶ added in v1.5.1
type ProposalLog ¶
type ProposalLogsDB ¶
type ProposalLogsDB struct {
// contains filtered or unexported fields
}
func NewProposalLogsDB ¶
func NewProposalLogsDB(db *sql.DB) *ProposalLogsDB
func (*ProposalLogsDB) DeleteOlderThan ¶
func (*ProposalLogsDB) InsertLog ¶
func (p *ProposalLogsDB) InsertLog(ctx context.Context, deal types.DealParams, accepted bool, reason string) error
type SealState ¶ added in v1.7.0
type SealState string
const SealStateCache SealState = "Cache"
const SealStateRemoved SealState = "Removed"
const SealStateSealed SealState = "Sealed"
const SealStateUnsealed SealState = "Unsealed"
type SectorState ¶ added in v1.7.0
type SectorStateDB ¶ added in v1.7.0
type SectorStateDB struct {
// contains filtered or unexported fields
}
func NewSectorStateDB ¶ added in v1.7.0
func NewSectorStateDB(db *sql.DB) *SectorStateDB
func (*SectorStateDB) List ¶ added in v1.7.0
func (sdb *SectorStateDB) List(ctx context.Context) ([]SectorState, error)
type StorageDB ¶
type StorageDB struct {
// contains filtered or unexported fields
}
func NewStorageDB ¶
func (*StorageDB) InsertLog ¶
func (s *StorageDB) InsertLog(ctx context.Context, logs ...*StorageLog) error
func (*StorageDB) TotalTagged ¶
func (*StorageDB) TotalTaggedForHost ¶ added in v1.4.0
type StorageLog ¶
type TotalTagged ¶
type TotalTagged struct { Collateral abi.TokenAmount PubMsg abi.TokenAmount }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.