Documentation
¶
Index ¶
- Constants
- Variables
- type ContentManager
- func (cm *ContentManager) AddDatabaseTracking(ctx context.Context, u *util.User, dserv ipld.NodeGetter, root cid.Cid, ...) (*util.Content, error)
- func (cm *ContentManager) AddDatabaseTrackingToContent(ctx context.Context, cont uint, dserv ipld.NodeGetter, root cid.Cid, ...) error
- func (cm *ContentManager) AggregateStagingZone(ctx context.Context, zone util.Content, loc string) error
- func (cm *ContentManager) ClearUnused(ctx context.Context, spaceRequest int64, loc string, users []uint, dryrun bool) (*collectionResult, error)
- func (cm *ContentManager) CreateAggregate(ctx context.Context, conts []util.Content) (ipld.Node, error)
- func (cm *ContentManager) DealMakingDisabled() bool
- func (cm *ContentManager) DoPinning(ctx context.Context, op *operation.PinningOperation, cb progress.PinProgressCB) error
- func (cm *ContentManager) GarbageCollect(ctx context.Context) error
- func (cm *ContentManager) GetContent(id uint) (*util.Content, error)
- func (cm *ContentManager) GetPieceCommitment(ctx context.Context, data cid.Cid, bs blockstore.Blockstore) (cid.Cid, uint64, abi.UnpaddedPieceSize, error)
- func (cm *ContentManager) GetPinOperation(cont util.Content, peers []*peer.AddrInfo, replaceID uint, makeDeal bool) *operation.PinningOperation
- func (cm *ContentManager) GetProviderDealStatus(ctx context.Context, d *model.ContentDeal, maddr address.Address, ...) (*storagemarket.ProviderDealState, bool, error)
- func (cm *ContentManager) GetRemovalCandidates(ctx context.Context, all bool, loc string, users []uint) ([]removalCandidateInfo, error)
- func (cm *ContentManager) GetStagingZoneContents(ctx context.Context, user uint, zoneID uint, limit int, offset int) ([]util.Content, error)
- func (cm *ContentManager) GetStagingZoneWithoutContents(ctx context.Context, user uint, zoneID uint) (*ContentStagingZone, error)
- func (cm *ContentManager) GetStagingZonesForUser(ctx context.Context, user uint) ([]*ContentStagingZone, error)
- func (cm *ContentManager) IsZoneAggregating(zoneID uint) bool
- func (cm *ContentManager) IsZoneConsolidating(zoneID uint) bool
- func (cm *ContentManager) MakeDealWithMiner(ctx context.Context, content util.Content, miner address.Address) (uint, error)
- func (cm *ContentManager) MarkFinishedAggregating(zoneID uint)
- func (cm *ContentManager) MarkFinishedConsolidating(zoneID uint)
- func (cm *ContentManager) MarkStartedAggregating(zoneID uint) bool
- func (cm *ContentManager) MarkStartedConsolidating(zoneID uint) bool
- func (cm *ContentManager) OffloadContents(ctx context.Context, conts []uint) (int, error)
- func (cm *ContentManager) PinContent(ctx context.Context, user uint, obj cid.Cid, filename string, ...) (*types.IpfsPinStatusResponse, *operation.PinningOperation, error)
- func (cm *ContentManager) PinDelegatesForContent(cont util.Content) []string
- func (cm *ContentManager) PinStatus(cont util.Content, origins []*peer.AddrInfo) (*types.IpfsPinStatusResponse, error)
- func (cm *ContentManager) RecordRetrievalFailure(rfr *util.RetrievalFailureRecord) error
- func (cm *ContentManager) RecordRetrievalSuccess(cc cid.Cid, m address.Address, rstats *filclient.RetrievalStats)
- func (cm *ContentManager) RefreshContent(ctx context.Context, cont uint) error
- func (cm *ContentManager) RefreshContentForCid(ctx context.Context, c cid.Cid) (blocks.Block, error)
- func (cm *ContentManager) RemoveContent(ctx context.Context, contID uint, now bool) error
- func (cm *ContentManager) Run(ctx context.Context)
- func (cm *ContentManager) SetDealMakingEnabled(enable bool)
- func (cm *ContentManager) ToCheck(contID uint)
- func (cm *ContentManager) TryRetrieve(ctx context.Context, maddr address.Address, c cid.Cid, ...) error
- func (cm *ContentManager) UnpinContent(ctx context.Context, contid uint) error
- func (cm *ContentManager) UpdatePinStatus(contID uint, location string, status types.PinningStatus) error
- type ContentStagingZone
- type DealFailureError
Constants ¶
View Source
const ( DEAL_CHECK_UNKNOWN = iota DEAL_CHECK_PROGRESS DEAL_CHECK_DEALID_ON_CHAIN DEAL_CHECK_SECTOR_ON_CHAIN DEAL_NEARLY_EXPIRED DEAL_CHECK_SLASHED )
Variables ¶
View Source
var ErrNotOnChainYet = fmt.Errorf("message not found on chain")
View Source
var ErrWaitForRemoteCompute = fmt.Errorf("waiting for remote commP computation")
Functions ¶
This section is empty.
Types ¶
type ContentManager ¶
type ContentManager struct {
// contains filtered or unexported fields
}
func NewContentManager ¶
func NewContentManager( db *gorm.DB, api api.Gateway, fc *filclient.FilClient, tbs *util.TrackingBlockstore, nd *node.Node, cfg *config.Estuary, minerManager miner.IMinerManager, log *zap.SugaredLogger, shuttleMgr shuttle.IManager, transferMgr transfer.IManager, queueMgr contentqueue.IQueueManager, ) (*ContentManager, error)
func (*ContentManager) AddDatabaseTracking ¶
func (*ContentManager) AddDatabaseTrackingToContent ¶
func (cm *ContentManager) AddDatabaseTrackingToContent(ctx context.Context, cont uint, dserv ipld.NodeGetter, root cid.Cid, cb func(int64)) error
func (*ContentManager) AggregateStagingZone ¶
func (cm *ContentManager) AggregateStagingZone(ctx context.Context, zone util.Content, loc string) error
AggregateStagingZone assumes zone is already in consolidatingZones
func (*ContentManager) ClearUnused ¶
func (*ContentManager) CreateAggregate ¶
func (*ContentManager) DealMakingDisabled ¶
func (cm *ContentManager) DealMakingDisabled() bool
func (*ContentManager) DoPinning ¶
func (cm *ContentManager) DoPinning(ctx context.Context, op *operation.PinningOperation, cb progress.PinProgressCB) error
func (*ContentManager) GarbageCollect ¶
func (cm *ContentManager) GarbageCollect(ctx context.Context) error
func (*ContentManager) GetContent ¶
func (cm *ContentManager) GetContent(id uint) (*util.Content, error)
func (*ContentManager) GetPieceCommitment ¶
func (cm *ContentManager) GetPieceCommitment(ctx context.Context, data cid.Cid, bs blockstore.Blockstore) (cid.Cid, uint64, abi.UnpaddedPieceSize, error)
func (*ContentManager) GetPinOperation ¶
func (cm *ContentManager) GetPinOperation(cont util.Content, peers []*peer.AddrInfo, replaceID uint, makeDeal bool) *operation.PinningOperation
func (*ContentManager) GetProviderDealStatus ¶
func (cm *ContentManager) GetProviderDealStatus(ctx context.Context, d *model.ContentDeal, maddr address.Address, dealUUID *uuid.UUID) (*storagemarket.ProviderDealState, bool, error)
first check deal protocol version 2, then check version 1
func (*ContentManager) GetRemovalCandidates ¶
func (*ContentManager) GetStagingZoneContents ¶ added in v0.3.2
func (*ContentManager) GetStagingZoneWithoutContents ¶ added in v0.3.2
func (cm *ContentManager) GetStagingZoneWithoutContents(ctx context.Context, user uint, zoneID uint) (*ContentStagingZone, error)
func (*ContentManager) GetStagingZonesForUser ¶
func (cm *ContentManager) GetStagingZonesForUser(ctx context.Context, user uint) ([]*ContentStagingZone, error)
func (*ContentManager) IsZoneAggregating ¶
func (cm *ContentManager) IsZoneAggregating(zoneID uint) bool
func (*ContentManager) IsZoneConsolidating ¶
func (cm *ContentManager) IsZoneConsolidating(zoneID uint) bool
func (*ContentManager) MakeDealWithMiner ¶
func (*ContentManager) MarkFinishedAggregating ¶
func (cm *ContentManager) MarkFinishedAggregating(zoneID uint)
func (*ContentManager) MarkFinishedConsolidating ¶
func (cm *ContentManager) MarkFinishedConsolidating(zoneID uint)
func (*ContentManager) MarkStartedAggregating ¶
func (cm *ContentManager) MarkStartedAggregating(zoneID uint) bool
func (*ContentManager) MarkStartedConsolidating ¶
func (cm *ContentManager) MarkStartedConsolidating(zoneID uint) bool
func (*ContentManager) OffloadContents ¶
func (*ContentManager) PinContent ¶
func (cm *ContentManager) PinContent(ctx context.Context, user uint, obj cid.Cid, filename string, cols []*collections.CollectionRef, origins []*peer.AddrInfo, replaceID uint, meta map[string]interface{}, makeDeal bool) (*types.IpfsPinStatusResponse, *operation.PinningOperation, error)
func (*ContentManager) PinDelegatesForContent ¶
func (cm *ContentManager) PinDelegatesForContent(cont util.Content) []string
func (*ContentManager) PinStatus ¶
func (cm *ContentManager) PinStatus(cont util.Content, origins []*peer.AddrInfo) (*types.IpfsPinStatusResponse, error)
func (*ContentManager) RecordRetrievalFailure ¶
func (cm *ContentManager) RecordRetrievalFailure(rfr *util.RetrievalFailureRecord) error
func (*ContentManager) RecordRetrievalSuccess ¶
func (cm *ContentManager) RecordRetrievalSuccess(cc cid.Cid, m address.Address, rstats *filclient.RetrievalStats)
func (*ContentManager) RefreshContent ¶
func (cm *ContentManager) RefreshContent(ctx context.Context, cont uint) error
func (*ContentManager) RefreshContentForCid ¶
func (*ContentManager) RemoveContent ¶
func (*ContentManager) Run ¶
func (cm *ContentManager) Run(ctx context.Context)
func (*ContentManager) SetDealMakingEnabled ¶
func (cm *ContentManager) SetDealMakingEnabled(enable bool)
func (*ContentManager) ToCheck ¶
func (cm *ContentManager) ToCheck(contID uint)
func (*ContentManager) TryRetrieve ¶
func (cm *ContentManager) TryRetrieve(ctx context.Context, maddr address.Address, c cid.Cid, ask *retrievalmarket.QueryResponse) error
func (*ContentManager) UnpinContent ¶
func (cm *ContentManager) UnpinContent(ctx context.Context, contid uint) error
func (*ContentManager) UpdatePinStatus ¶
func (cm *ContentManager) UpdatePinStatus(contID uint, location string, status types.PinningStatus) error
even though there are 4 pin statuses, queued, pinning, pinned and failed the UpdatePinStatus only changes DB state for failed status when the content was added, status = pinning when the pin process is complete, status = pinned
type ContentStagingZone ¶
type ContentStagingZone struct { ZoneOpened time.Time `json:"zoneOpened"` Contents []util.Content `json:"contents"` MinSize int64 `json:"minSize"` MaxSize int64 `json:"maxSize"` CurSize int64 `json:"curSize"` User uint `json:"user"` ContID uint `json:"contentID"` Location string `json:"location"` IsConsolidating bool `json:"isConsolidating"` IsAggregating bool `json:"isAggregating"` // contains filtered or unexported fields }
type DealFailureError ¶
type DealFailureError struct { Miner address.Address DealUUID string Phase string Message string Content uint UserID uint MinerAddress string DealProtocolVersion protocol.ID MinerVersion string }
func (*DealFailureError) Error ¶
func (dfe *DealFailureError) Error() string
func (*DealFailureError) Record ¶
func (dfe *DealFailureError) Record() *model.DfeRecord
Source Files
¶
Click to show internal directories.
Click to hide internal directories.