Documentation ¶
Index ¶
- Variables
- type Blockstore
- type LotusMount
- func (l *LotusMount) Close() error
- func (l *LotusMount) Deserialize(u *url.URL) error
- func (l *LotusMount) Fetch(ctx context.Context) (mount.Reader, error)
- func (l *LotusMount) Info() mount.Info
- func (l *LotusMount) Serialize() *url.URL
- func (l *LotusMount) Stat(ctx context.Context) (mount.Stat, error)
- type MinerAPI
- type SectorAccessor
- type Wrapper
- func (w *Wrapper) Close() error
- func (w *Wrapper) LoadShard(ctx context.Context, pieceCid cid.Cid) (stores.ClosableBlockstore, error)
- func (w *Wrapper) MigrateDeals(ctx context.Context, deals []storagemarket.MinerDeal) (bool, error)
- func (w *Wrapper) RegisterShard(ctx context.Context, pieceCid cid.Cid, carPath string, eagerInit bool, ...) error
- func (w *Wrapper) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxPieceReaderBurnBytes int64 = 1 << 20 // 1M
For small read skips, it's faster to "burn" some bytes than to setup new sector reader. Assuming 1ms stream seek latency, and 1G/s stream rate, we're willing to discard up to 1 MiB.
View Source
var ReadBuf = 128 * (127 * 8) // unpadded(128k)
Functions ¶
This section is empty.
Types ¶
type Blockstore ¶
type Blockstore struct { dagstore.ReadBlockstore io.Closer }
Blockstore promotes a dagstore.ReadBlockstore to a full closeable Blockstore, stubbing out the write methods with erroring implementations.
func (*Blockstore) DeleteBlock ¶
func (b *Blockstore) DeleteBlock(c cid.Cid) error
type LotusMount ¶
type LotusMount struct { API MinerAPI PieceCid cid.Cid }
LotusMount is a DAGStore mount implementation that fetches deal data from a PieceCID.
func NewLotusMount ¶
func NewLotusMount(pieceCid cid.Cid, api MinerAPI) (*LotusMount, error)
func (*LotusMount) Close ¶
func (l *LotusMount) Close() error
func (*LotusMount) Deserialize ¶
func (l *LotusMount) Deserialize(u *url.URL) error
func (*LotusMount) Info ¶
func (l *LotusMount) Info() mount.Info
func (*LotusMount) Serialize ¶
func (l *LotusMount) Serialize() *url.URL
type MinerAPI ¶
type MinerAPI interface { FetchUnsealedPiece(ctx context.Context, pieceCid cid.Cid, offset uint64) (io.ReadCloser, abi.UnpaddedPieceSize, error) GetUnpaddedCARSize(ctx context.Context, pieceCid cid.Cid) (uint64, error) IsUnsealed(ctx context.Context, pieceCid cid.Cid) (bool, error) Start(ctx context.Context) error }
func NewMinerAPI ¶
func NewMinerAPI(store piecestore.PieceStore, sa SectorAccessor, concurrency int) MinerAPI
type SectorAccessor ¶ added in v1.13.2
type SectorAccessor interface { retrievalmarket.SectorAccessor UnsealSectorAt(ctx context.Context, sectorID abi.SectorNumber, pieceOffset abi.UnpaddedPieceSize, startOffset uint64, length abi.UnpaddedPieceSize) (io.ReadCloser, error) }
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func NewDAGStore ¶
func (*Wrapper) MigrateDeals ¶
func (*Wrapper) RegisterShard ¶
Click to show internal directories.
Click to hide internal directories.