ffi

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReleaseStorageFunc

type ReleaseStorageFunc func() // free storage reservation

type SealCalls

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

type ExternPrecommit2 func(ctx context.Context, sector storiface.SectorRef, cache, sealed string, pc1out storiface.PreCommit1Out) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)

type ExternalSealer struct {
	PreCommit2 ExternPrecommit2
}

func NewSealCalls

func NewSealCalls(st *paths.Remote, ls *paths.Local, si paths.SectorIndex) *SealCalls

func (*SealCalls) FinalizeSector

func (sb *SealCalls) FinalizeSector(ctx context.Context, sector storiface.SectorRef, keepUnsealed bool) error

func (*SealCalls) GenerateSDR

func (sb *SealCalls) GenerateSDR(ctx context.Context, taskID harmonytask.TaskID, sector storiface.SectorRef, ticket abi.SealRandomness, commKcid cid.Cid) error

func (*SealCalls) GenerateSynthPoRep

func (sb *SealCalls) GenerateSynthPoRep()

func (*SealCalls) LocalStorage

func (sb *SealCalls) LocalStorage(ctx context.Context) ([]storiface.StoragePath, error)

func (*SealCalls) MoveStorage

func (sb *SealCalls) MoveStorage(ctx context.Context, sector storiface.SectorRef, taskID *harmonytask.TaskID) error

func (*SealCalls) PieceReader

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

func (*SealCalls) PoRepSnark

func (sb *SealCalls) PoRepSnark(ctx context.Context, sn storiface.SectorRef, sealed, unsealed cid.Cid, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness) ([]byte, error)

func (*SealCalls) PreFetch

func (sb *SealCalls) PreFetch(ctx context.Context, sector storiface.SectorRef, task *harmonytask.TaskID) (fsPath, pathID storiface.SectorPaths, releaseSector func(), err error)

PreFetch fetches the sector file to local storage before SDR and TreeRC Tasks

func (*SealCalls) RemovePiece

func (sb *SealCalls) RemovePiece(ctx context.Context, id storiface.PieceNumber) error

func (*SealCalls) Storage

func (sb *SealCalls) Storage(taskToSectorRef func(taskID harmonytask.TaskID) (SectorRef, error), alloc, existing storiface.SectorFileType, ssize abi.SectorSize, pathType storiface.PathType, MinFreeStoragePercentage float64) *TaskStorage

func (*SealCalls) TreeD

func (sb *SealCalls) TreeD(ctx context.Context, sector storiface.SectorRef, unsealed cid.Cid, size abi.PaddedPieceSize, data io.Reader, unpaddedData bool, fspaths, pathIDs storiface.SectorPaths) error

func (*SealCalls) TreeRC

func (sb *SealCalls) TreeRC(ctx context.Context, task *harmonytask.TaskID, sector storiface.SectorRef, unsealed cid.Cid) (scid cid.Cid, ucid cid.Cid, err error)

func (*SealCalls) WritePiece

func (sb *SealCalls) WritePiece(ctx context.Context, taskID *harmonytask.TaskID, pieceID storiface.PieceNumber, size int64, data io.Reader) error

type SectorRef

type SectorRef struct {
	SpID         int64                   `db:"sp_id"`
	SectorNumber int64                   `db:"sector_number"`
	RegSealProof abi.RegisteredSealProof `db:"reg_seal_proof"`
}

func (SectorRef) ID

func (sr SectorRef) ID() abi.SectorID

func (SectorRef) Ref

func (sr SectorRef) Ref() storiface.SectorRef

type StorageReservation

type StorageReservation struct {
	SectorRef SectorRef
	Release   ReleaseStorageFunc
	Paths     storiface.SectorPaths
	PathIDs   storiface.SectorPaths

	Alloc, Existing storiface.SectorFileType
}

type TaskStorage

type TaskStorage struct {

	// Minimum free storage percentage cutoff for reservation rejection
	MinFreeStoragePercentage float64
	// contains filtered or unexported fields
}

func (*TaskStorage) Claim

func (t *TaskStorage) Claim(taskID int) (func() error, error)

func (*TaskStorage) HasCapacity

func (t *TaskStorage) HasCapacity() bool

Jump to

Keyboard shortcuts

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