Documentation
¶
Index ¶
- Constants
- Variables
- type ContentDeal
- type DealQueue
- type DealQueueTracker
- type DfeRecord
- type MinerStorageAsk
- type PieceCommRecord
- type ProposalRecord
- type RetrievalSuccessRecord
- type SanityCheck
- type Shuttle
- type ShuttleConnection
- type SplitQueue
- type SplitQueueTracker
- type StagingZone
- type StagingZoneQueue
- type StagingZoneTracker
- type StorageMiner
- type ZoneMessage
- type ZoneStatus
Constants ¶
View Source
const ( ZoneStatuAggregating ZoneStatus = "aggregating" ZoneStatusConsolidating ZoneStatus = "consolidation" ZoneStatusDone ZoneStatus = "done" ZoneStatusStuck ZoneStatus = "stuck" ZoneStatusOpen ZoneStatus = "open" ZoneMessageOpen ZoneMessage = "Zone is open for content aggregation" ZoneMessageDone ZoneMessage = "Zone has been aggregated and a deal will be made for it" ZoneMessageAggregating ZoneMessage = "Zone contents are under aggregation processing" ZoneMessageConsolidating ZoneMessage = "Zone contents are under consolidation processing" ZoneMessageStuck ZoneMessage = "Zone aggregation is failing" )
Variables ¶
View Source
var ErrNoChannelID = fmt.Errorf("no data transfer channel id in deal")
Functions ¶
This section is empty.
Types ¶
type ContentDeal ¶
type ContentDeal struct {
gorm.Model
Content uint64 `json:"content" gorm:"index:,option:CONCURRENTLY"`
UserID uint `json:"user_id" gorm:"index:,option:CONCURRENTLY"`
PropCid util.DbCID `json:"propCid"`
DealUUID string `json:"dealUuid"`
Miner string `json:"miner"`
DealID int64 `json:"dealId"`
Failed bool `json:"failed"`
Verified bool `json:"verified"`
Slashed bool `json:"slashed"`
FailedAt time.Time `json:"failedAt,omitempty"`
DTChan string `json:"dtChan" gorm:"index"`
TransferStarted time.Time `json:"transferStarted"`
TransferFinished time.Time `json:"transferFinished"`
OnChainAt time.Time `json:"onChainAt"`
SealedAt time.Time `json:"sealedAt"`
DealProtocolVersion protocol.ID `json:"deal_protocol_version"`
MinerVersion string `json:"miner_version"`
}
func (ContentDeal) ChannelID ¶
func (cd ContentDeal) ChannelID() (datatransfer.ChannelID, error)
type DealQueue ¶ added in v0.4.0
type DealQueue struct {
gorm.Model
ID uint64 `gorm:"primarykey" json:"-"`
UserID uint `gorm:"index:deals_user_id_cont_id;not null;index" json:"-"`
ContID uint64 `gorm:"index:deals_user_id_cont_id;not null;unique;index" json:"-"`
ContCid util.DbCID `gorm:"index;not null" json:"-"`
CommpDone bool `` /* 179-byte string literal not displayed */
CommpAttempted uint `gorm:"index:commp_done_commp_attempted_commp_next_attempt_at;not null" json:"-"`
CommpNextAttemptAt time.Time `gorm:"index:commp_done_commp_attempted_commp_next_attempt_at;not null" json:"-"`
CanDeal bool `gorm:"index:can_deal_commp_done_deal_next_attempt_at;index:can_deal_commp_done_deal_check_next_attempt_at;not null" json:"-"`
DealCount int `gorm:"not null" json:"-"`
DealCheckNextAttemptAt time.Time `gorm:"index:can_deal_commp_done_deal_next_attempt_at;index:can_deal_commp_done_deal_check_next_attempt_at;not null" json:"-"`
DealNextAttemptAt time.Time `gorm:"index; not null" json:"-"`
}
type DealQueueTracker ¶ added in v0.4.0
type DfeRecord ¶
type DfeRecord struct {
gorm.Model
Miner string `json:"miner"`
DealUUID string `json:"deal_uuid"`
Phase string `json:"phase"`
Message string `json:"message"`
Content uint64 `json:"content" gorm:"index"`
MinerVersion string `json:"minerVersion"`
UserID uint `json:"user_id" gorm:"index"`
DealProtocolVersion protocol.ID `json:"deal_protocol_version"`
}
type MinerStorageAsk ¶
type MinerStorageAsk struct {
gorm.Model `json:"-"`
Miner string `gorm:"unique" json:"miner"`
Price string `json:"price"`
VerifiedPrice string `json:"verifiedPrice"`
PriceBigInt big.Int `gorm:"-" json:"-"`
VerifiedPriceBigInt big.Int `gorm:"-" json:"-"`
MinPieceSize abi.PaddedPieceSize `json:"minPieceSize"`
MaxPieceSize abi.PaddedPieceSize `json:"maxPieceSize"`
MinerVersion string `json:"miner_version"`
}
func (*MinerStorageAsk) GetPrice ¶
func (msa *MinerStorageAsk) GetPrice(isVerifiedDeal bool) types.BigInt
func (*MinerStorageAsk) PriceIsTooHigh ¶
func (msa *MinerStorageAsk) PriceIsTooHigh(cfg *config.Estuary) bool
func (*MinerStorageAsk) SizeIsCloseEnough ¶
func (msa *MinerStorageAsk) SizeIsCloseEnough(pieceSize abi.PaddedPieceSize) bool
type PieceCommRecord ¶
type ProposalRecord ¶
type RetrievalSuccessRecord ¶
type RetrievalSuccessRecord struct {
ID uint `gorm:"primarykey" json:"-"`
CreatedAt time.Time `json:"createdAt"`
Cid util.DbCID `json:"cid"`
Miner string `json:"miner"`
Peer string `json:"peer"`
Size uint64 `json:"size"`
DurationMs int64 `json:"durationMs"`
AverageSpeed uint64 `json:"averageSpeed"`
TotalPayment string `json:"totalPayment"`
NumPayments int `json:"numPayments"`
AskPrice string `json:"askPrice"`
}
type SanityCheck ¶
type ShuttleConnection ¶ added in v0.3.7
type ShuttleConnection struct {
gorm.Model
UpdatedAt time.Time
Handle string `gorm:"unique;index"`
Hostname string
AddrInfo util.DbAddrInfo
Address util.DbAddr
Private bool
ContentAddingDisabled bool
SpaceLow bool
BlockstoreSize uint64
BlockstoreFree uint64
PinCount int64
PinQueueLength int64
QueueEngEnabled bool
}
type SplitQueue ¶ added in v0.4.0
type SplitQueue struct {
gorm.Model
ID uint64 `gorm:"primarykey" json:"-"`
UserID uint64 `gorm:"index:splits_user_id_cont_id;not null;index" json:"-"`
ContID uint64 `gorm:"index:splits_user_id_cont_id;not null;index;unique" json:"-"`
Failing bool `gorm:"not null" json:"-"`
Attempted uint `gorm:"index:attempted_next_attempt_at;index;not null" json:"-"`
NextAttemptAt time.Time `gorm:"index:attempted_next_attempt_at;index;not null" json:"-"`
}
type SplitQueueTracker ¶ added in v0.4.0
type StagingZone ¶ added in v0.3.6
type StagingZone struct {
gorm.Model
ID uint64 `gorm:"index:id_size_status;index:id_status" json:"id"`
CreatedAt time.Time `gorm:"index;not null" json:"createdAt"`
MinSize int64 `gorm:"index;not null" json:"minSize"`
MaxSize int64 `json:"maxSize"`
Size int64 `` /* 142-byte string literal not displayed */
UserID uint `gorm:"index:user_size_status;index;not null" json:"user"`
ContID uint64 `gorm:"index;not null" json:"contentID"`
Location string `gorm:"index;not null" json:"location"`
Status ZoneStatus `` /* 142-byte string literal not displayed */
Message ZoneMessage `json:"message" gorm:"type:text"`
Attempted uint `gorm:"index:attempted_next_attempt_at_size_status" json:"-"`
NextAttemptAt time.Time `gorm:"index:attempted_next_attempt_at_size_status" json:"-"`
}
type StagingZoneQueue ¶ added in v0.4.0
type StagingZoneQueue struct {
gorm.Model
ID uint64 `gorm:"primarykey" json:"-"`
UserID uint64 `gorm:"index:cont_id_user_id;index;not null" json:"-"`
ContID uint64 `gorm:"index:cont_id_user_id;unique;index;not null" json:"-"`
Failing bool `gorm:"not null" json:"-"`
NextAttemptAt time.Time `gorm:"index;not null" json:"-"`
IsBackFilled bool `gorm:"not null" json:"-"`
}
type StagingZoneTracker ¶ added in v0.3.6
type StorageMiner ¶
type ZoneMessage ¶ added in v0.3.6
type ZoneMessage string
type ZoneStatus ¶ added in v0.3.6
type ZoneStatus string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.