Documentation ¶
Index ¶
Constants ¶
View Source
const ( TASK_STATUS_ERROR = 0 TASK_STATUS_NONE = 1 TASK_STATUS_PLOTTING = 2 TASK_STATUS_DONE = 3 )
View Source
const (
PROGRESS_MAX = 10000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PloterAllocator ¶
type PloterStorage ¶
type PloterStorage interface {
GetAllPlotWorks() []Work
}
type Plotter ¶
type Plotter struct {
// contains filtered or unexported fields
}
* Plotter是指P盘器, * 一个进程中的P盘器掌控着所有的P盘信息, * P盘器是所有P盘实际操作的入口, * P盘器的管理以Work为单位
func GetPlotterInstance ¶
func GetPlotterInstance(storage PloterStorage, allocator PloterAllocator) *Plotter
func (*Plotter) IsPlotting ¶
type TASK_STATUS ¶
type TASK_STATUS int
type Work ¶
type Work struct { Id string PlotSeed string PlotDir string PlotSize uint64 // contains filtered or unexported fields }
*一个Work对应着某一个需要P的目录; *一个Work由多个Task组成; * 每一个Work有一个work进度,由已完成任务及正在进行的任务共同构成; * 每一个Task代表一个即将进行或者正在进行的P盘操作。 *
func (*Work) CommitTask ¶
func (*Work) RollbackTask ¶
Click to show internal directories.
Click to hide internal directories.