piece

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PieceParkPollInterval = time.Second * 15

Functions

This section is empty.

Types

type CleanupPieceTask

type CleanupPieceTask struct {
	TF promise.Promise[harmonytask.AddTaskFunc]
	// contains filtered or unexported fields
}

func NewCleanupPieceTask

func NewCleanupPieceTask(db *harmonydb.DB, sc *ffi.SealCalls, max int) *CleanupPieceTask

func (*CleanupPieceTask) Adder

func (c *CleanupPieceTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*CleanupPieceTask) CanAccept

func (*CleanupPieceTask) Do

func (c *CleanupPieceTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*CleanupPieceTask) TypeDetails

func (c *CleanupPieceTask) TypeDetails() harmonytask.TaskTypeDetails

type ParkPieceTask

type ParkPieceTask struct {
	TF promise.Promise[harmonytask.AddTaskFunc]
	// contains filtered or unexported fields
}

ParkPieceTask gets a piece from some origin, and parks it in storage Pieces are always f00, piece ID is mapped to pieceCID in the DB

func NewParkPieceTask

func NewParkPieceTask(db *harmonydb.DB, sc *ffi2.SealCalls, max int) (*ParkPieceTask, error)

func (*ParkPieceTask) Adder

func (p *ParkPieceTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*ParkPieceTask) CanAccept

func (p *ParkPieceTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)

func (*ParkPieceTask) Do

func (p *ParkPieceTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*ParkPieceTask) TypeDetails

func (p *ParkPieceTask) TypeDetails() harmonytask.TaskTypeDetails

Jump to

Keyboard shortcuts

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