Documentation ¶
Index ¶
- Constants
- Variables
- func ParseSectorID(baseName string) (abi.SectorID, error)
- func PathByType(sps SectorPaths, fileType SectorFileType) string
- func SectorName(sid abi.SectorID) string
- func SetPathByType(sps *SectorPaths, fileType SectorFileType, p string)
- type AcquireMode
- type CallID
- type PaddedByteIndex
- type PathType
- type SectorFileType
- type SectorPaths
- type UnpaddedByteIndex
- type WorkerCalls
- type WorkerInfo
- type WorkerJob
- type WorkerResources
- type WorkerReturn
- type WorkerStats
Constants ¶
View Source
const ( RWRetWait = -1 RWReturned = -2 RWRetDone = -3 )
View Source
const FSOverheadDen = 10
Variables ¶
View Source
var ErrSectorNotFound = errors.New("sector not found")
View Source
var FSOverheadSeal = map[SectorFileType]int{ FTUnsealed: FSOverheadDen, FTSealed: FSOverheadDen, FTCache: 141, }
View Source
var FsOverheadFinalized = map[SectorFileType]int{ FTUnsealed: FSOverheadDen, FTSealed: FSOverheadDen, FTCache: 2, }
View Source
var PathTypes = []SectorFileType{FTUnsealed, FTSealed, FTCache}
Functions ¶
func PathByType ¶ added in v1.1.3
func PathByType(sps SectorPaths, fileType SectorFileType) string
func SectorName ¶ added in v1.1.3
func SetPathByType ¶ added in v1.1.3
func SetPathByType(sps *SectorPaths, fileType SectorFileType, p string)
Types ¶
type AcquireMode ¶ added in v1.1.3
type AcquireMode string
const ( AcquireMove AcquireMode = "move" AcquireCopy AcquireMode = "copy" )
type PaddedByteIndex ¶
type PaddedByteIndex uint64
type SectorFileType ¶ added in v1.1.3
type SectorFileType int
const ( FTUnsealed SectorFileType = 1 << iota FTSealed FTCache FileTypes = iota )
const (
FTNone SectorFileType = 0
)
func (SectorFileType) All ¶ added in v1.1.3
func (t SectorFileType) All() [FileTypes]bool
func (SectorFileType) Has ¶ added in v1.1.3
func (t SectorFileType) Has(singleType SectorFileType) bool
func (SectorFileType) SealSpaceUse ¶ added in v1.1.3
func (t SectorFileType) SealSpaceUse(ssize abi.SectorSize) (uint64, error)
func (SectorFileType) String ¶ added in v1.1.3
func (t SectorFileType) String() string
type SectorPaths ¶ added in v1.1.3
type UnpaddedByteIndex ¶
type UnpaddedByteIndex uint64
func (UnpaddedByteIndex) Padded ¶
func (i UnpaddedByteIndex) Padded() PaddedByteIndex
type WorkerCalls ¶ added in v1.1.3
type WorkerCalls interface { AddPiece(ctx context.Context, sector abi.SectorID, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData storage.Data) (CallID, error) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, pieces []abi.PieceInfo) (CallID, error) SealPreCommit2(ctx context.Context, sector abi.SectorID, pc1o storage.PreCommit1Out) (CallID, error) SealCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (CallID, error) SealCommit2(ctx context.Context, sector abi.SectorID, c1o storage.Commit1Out) (CallID, error) FinalizeSector(ctx context.Context, sector abi.SectorID, keepUnsealed []storage.Range) (CallID, error) ReleaseUnsealed(ctx context.Context, sector abi.SectorID, safeToFree []storage.Range) (CallID, error) MoveStorage(ctx context.Context, sector abi.SectorID, types SectorFileType) (CallID, error) UnsealPiece(context.Context, abi.SectorID, UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) (CallID, error) ReadPiece(context.Context, io.Writer, abi.SectorID, UnpaddedByteIndex, abi.UnpaddedPieceSize) (CallID, error) Fetch(context.Context, abi.SectorID, SectorFileType, PathType, AcquireMode) (CallID, error) }
type WorkerInfo ¶
type WorkerInfo struct { Hostname string Resources WorkerResources }
type WorkerResources ¶
type WorkerReturn ¶ added in v1.1.3
type WorkerReturn interface { ReturnAddPiece(ctx context.Context, callID CallID, pi abi.PieceInfo, err string) error ReturnSealPreCommit1(ctx context.Context, callID CallID, p1o storage.PreCommit1Out, err string) error ReturnSealPreCommit2(ctx context.Context, callID CallID, sealed storage.SectorCids, err string) error ReturnSealCommit1(ctx context.Context, callID CallID, out storage.Commit1Out, err string) error ReturnSealCommit2(ctx context.Context, callID CallID, proof storage.Proof, err string) error ReturnFinalizeSector(ctx context.Context, callID CallID, err string) error ReturnReleaseUnsealed(ctx context.Context, callID CallID, err string) error ReturnMoveStorage(ctx context.Context, callID CallID, err string) error ReturnUnsealPiece(ctx context.Context, callID CallID, err string) error ReturnReadPiece(ctx context.Context, callID CallID, ok bool, err string) error ReturnFetch(ctx context.Context, callID CallID, err string) error }
type WorkerStats ¶
Click to show internal directories.
Click to hide internal directories.