Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
ProofSetAPI
PieceAPI
}
type AllocatedPiece ¶
func (AllocatedPiece) MarshalLogObject ¶
func (a AllocatedPiece) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for AllocatedPiece
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a service error with a kind
type Piece ¶
type Piece struct {
// Name of the hash function used
// sha2-256-trunc254-padded - CommP
// sha2-256 - Blob sha256
Name string
// hex encoded hash
Hash string
// Size of the piece in bytes
Size int64
}
func (Piece) MarshalLogObject ¶
func (p Piece) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for Piece
type PieceAPI ¶
type PieceAPI interface {
AllocatePiece(ctx context.Context, allocation PieceAllocation) (*AllocatedPiece, error)
UploadPiece(ctx context.Context, upload PieceUpload) error
FindPiece(ctx context.Context, piece Piece) (cid.Cid, bool, error)
ReadPiece(ctx context.Context, piece cid.Cid) (*PieceReader, error)
}
type PieceAllocation ¶
func (PieceAllocation) MarshalLogObject ¶
func (p PieceAllocation) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for PieceAllocation
type PieceReader ¶
type PieceReader struct {
Size int64
Data io.ReadCloser
}
func (PieceReader) MarshalLogObject ¶
func (p PieceReader) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for PieceReader
type PieceUpload ¶
func (PieceUpload) MarshalLogObject ¶
func (p PieceUpload) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for PieceUpload
type ProofSet ¶
type ProofSet struct {
ID uint64
Initialized bool
NextChallengeEpoch int64
PreviousChallengeEpoch int64
ProvingPeriod int64
ChallengeWindow int64
Roots []RootEntry
}
func (ProofSet) MarshalLogObject ¶
func (p ProofSet) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for ProofSet
type ProofSetAPI ¶
type ProofSetAPI interface {
CreateProofSet(ctx context.Context, recordKeeper common.Address) (common.Hash, error)
GetProofSetStatus(ctx context.Context, txHash common.Hash) (*ProofSetStatus, error)
GetProofSet(ctx context.Context, proofSetID uint64) (*ProofSet, error)
AddRoots(ctx context.Context, proofSetID uint64, roots []RootAdd) (common.Hash, error)
RemoveRoot(ctx context.Context, proofSetID uint64, rootID uint64) (common.Hash, error)
}
type ProofSetStatus ¶
func (ProofSetStatus) MarshalLogObject ¶
func (p ProofSetStatus) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for ProofSetStatus
type RootAdd ¶
func (RootAdd) MarshalLogObject ¶
func (r RootAdd) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore.ObjectMarshaler for RootAdd
Click to show internal directories.
Click to hide internal directories.