Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Storage: DatoCid call
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k authored and arajasek committed May 30, 2022
1 parent 5ff6068 commit d9187f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ type SectorRef struct {
ProofType abi.RegisteredSealProof
}

var NoSectorRef = SectorRef{}

type Storage interface {
// Creates a new empty sector (only allocate on disk. Layers above
// storage are responsible for assigning sector IDs)
NewSector(ctx context.Context, sector SectorRef) error
// Compute Data CID
DataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData Data) (abi.PieceInfo, error)
// Add a piece to an existing *unsealed* sector
AddPiece(ctx context.Context, sector SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData Data) (abi.PieceInfo, error)
}
Expand Down

0 comments on commit d9187f0

Please sign in to comment.