lotus/storage/sector/storiface/worker.go

42 lines
634 B
Go
Raw Normal View History

package storiface
2020-07-21 18:01:25 +00:00
import (
"time"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
2020-07-21 18:01:25 +00:00
"github.com/filecoin-project/specs-actors/actors/abi"
)
type WorkerInfo struct {
Hostname string
Resources WorkerResources
}
type WorkerResources struct {
MemPhysical uint64
MemSwap uint64
MemReserved uint64 // Used by system / other processes
CPUs uint64 // Logical cores
GPUs []string
}
type WorkerStats struct {
Info WorkerInfo
MemUsedMin uint64
MemUsedMax uint64
GpuUsed bool
2020-04-27 12:55:37 +00:00
CpuUse uint64
}
2020-07-21 18:01:25 +00:00
type WorkerJob struct {
ID uint64
Sector abi.SectorID
Task sealtasks.TaskType
Start time.Time
}