piecestore

package
v1.28.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PieceIO

type PieceIO interface {
	WritePiece(ctx context.Context, taskID *harmonytask.TaskID, pieceID storiface.PieceNumber, size int64, data io.Reader, storageType storiface.PathType) error
	WriteUploadPiece(ctx context.Context, pieceID storiface.PieceNumber, size int64, data io.Reader, storageType storiface.PathType, verifySize bool) (abi.PieceInfo, uint64, error)
	PieceReader(ctx context.Context, id storiface.PieceNumber) (io.ReadCloser, error)
	RemovePiece(ctx context.Context, id storiface.PieceNumber) error
}

PieceIO provides FFI-free piece storage operations.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements PieceIO using local/remote path storage without filecoin-ffi.

func New

func New(st *paths.Remote, ls *paths.Local, si paths.SectorIndex) *Store

func (*Store) PieceReader

func (s *Store) PieceReader(ctx context.Context, id storiface.PieceNumber) (io.ReadCloser, error)

func (*Store) RemovePiece

func (s *Store) RemovePiece(ctx context.Context, id storiface.PieceNumber) error

func (*Store) WritePiece

func (s *Store) WritePiece(ctx context.Context, taskID *harmonytask.TaskID, pieceID storiface.PieceNumber, size int64, data io.Reader, storageType storiface.PathType) error

func (*Store) WriteUploadPiece

func (s *Store) WriteUploadPiece(ctx context.Context, pieceID storiface.PieceNumber, size int64, data io.Reader, storageType storiface.PathType, verifySize bool) (abi.PieceInfo, uint64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL