fakelm

package
v1.24.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0, MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LMRPCProvider

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

func NewLMRPCProvider

func NewLMRPCProvider(si paths.SectorIndex, full api.Chain, maddr address.Address, minerID abi.ActorID, ssize abi.SectorSize, pi market.Ingester, db *harmonydb.DB, conf *config.CurioConfig) *LMRPCProvider

func (*LMRPCProvider) ActorAddress

func (l *LMRPCProvider) ActorAddress(ctx context.Context) (address.Address, error)

func (*LMRPCProvider) AllocatePieceToSector

func (l *LMRPCProvider) AllocatePieceToSector(ctx context.Context, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (lapi.SectorOffset, error)

func (*LMRPCProvider) AuthNew

func (l *LMRPCProvider) AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error)

func (*LMRPCProvider) ComputeDataCid

func (l *LMRPCProvider) ComputeDataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (abi.PieceInfo, error)

func (*LMRPCProvider) IsUnsealed

func (l *LMRPCProvider) IsUnsealed(ctx context.Context, sectorNum abi.SectorNumber, offset abi.UnpaddedPieceSize, length abi.UnpaddedPieceSize) (bool, error)

func (*LMRPCProvider) SectorAddPieceToAny

func (*LMRPCProvider) SectorsList

func (l *LMRPCProvider) SectorsList(ctx context.Context) ([]abi.SectorNumber, error)

func (*LMRPCProvider) SectorsListInStates

func (l *LMRPCProvider) SectorsListInStates(ctx context.Context, want []lapi.SectorState) ([]abi.SectorNumber, error)

func (*LMRPCProvider) SectorsStatus

func (l *LMRPCProvider) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (lapi.SectorInfo, error)

func (*LMRPCProvider) SectorsSummary

func (l *LMRPCProvider) SectorsSummary(ctx context.Context) (map[lapi.SectorState]int, error)

func (*LMRPCProvider) StorageRedeclareLocal

func (l *LMRPCProvider) StorageRedeclareLocal(ctx context.Context, id *storiface.ID, b bool) error

func (*LMRPCProvider) WorkerJobs

func (l *LMRPCProvider) WorkerJobs(ctx context.Context) (map[uuid.UUID][]storiface.WorkerJob, error)

type MinimalLMApi

type MinimalLMApi interface {
	ActorAddress(context.Context) (address.Address, error)

	WorkerJobs(context.Context) (map[uuid.UUID][]storiface.WorkerJob, error)

	SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error)

	SectorsList(context.Context) ([]abi.SectorNumber, error)
	SectorsSummary(ctx context.Context) (map[api.SectorState]int, error)

	SectorsListInStates(context.Context, []api.SectorState) ([]abi.SectorNumber, error)

	StorageRedeclareLocal(context.Context, *storiface.ID, bool) error

	ComputeDataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (abi.PieceInfo, error)
	SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storiface.Data, d api.PieceDealInfo) (api.SectorOffset, error)
}

MinimalLMApi is a subset of the LotusMiner API that is exposed by Curio for consumption by boost

Jump to

Keyboard shortcuts

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