Documentation ¶
Index ¶
- type FilChain
- type FilCold
- func (fc *FilCold) EnsureRenewals(ctx context.Context, c cid.Cid, inf ffs.FilInfo, cfg ffs.FilConfig) (ffs.FilInfo, []ffs.DealError, error)
- func (fc *FilCold) IsFilDealActive(ctx context.Context, proposalCid cid.Cid) (bool, error)
- func (fc *FilCold) Retrieve(ctx context.Context, dataCid cid.Cid, cs car.Store, waddr string) (cid.Cid, error)
- func (fc *FilCold) Store(ctx context.Context, c cid.Cid, cfg ffs.FilConfig) (ffs.FilInfo, []ffs.DealError, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilCold ¶
type FilCold struct {
// contains filtered or unexported fields
}
FilCold is a ffs.ColdStorage implementation that stores data in Filecoin.
func New ¶
func New(ms ffs.MinerSelector, dm *deals.Module, dag format.DAGService, chain FilChain, l ffs.CidLogger) *FilCold
New returns a new FilCold instance
func (*FilCold) EnsureRenewals ¶
func (fc *FilCold) EnsureRenewals(ctx context.Context, c cid.Cid, inf ffs.FilInfo, cfg ffs.FilConfig) (ffs.FilInfo, []ffs.DealError, error)
EnsureRenewals analyzes a FilInfo state for a Cid and executes renewals considering the FilConfig desired configuration.
func (*FilCold) IsFilDealActive ¶
IsFilDealActive returns true if a deal is considered active on-chain, false otherwise.
func (*FilCold) Retrieve ¶
func (fc *FilCold) Retrieve(ctx context.Context, dataCid cid.Cid, cs car.Store, waddr string) (cid.Cid, error)
Retrieve returns the original data Cid, from the CAR encoded data Cid. The returned Cid is available in the car.Store received as a parameter.
func (*FilCold) Store ¶
func (fc *FilCold) Store(ctx context.Context, c cid.Cid, cfg ffs.FilConfig) (ffs.FilInfo, []ffs.DealError, error)
Store stores a Cid in Filecoin considering the configuration provided. The Cid is retrieved using the DAGService registered on instance creation. It returns a slice of strings with errors related to deals executions.