Documentation ¶
Index ¶
- Constants
- Variables
- func GetMinerDealTaskStats(keyFile string) map[string]*DealTaskStats
- func MkLinkSystem(bs blockstore.Blockstore, ch chan *FinishedTask) ipld.LinkSystem
- type AuthenticatedRecord
- type Count
- type DealTaskStats
- type FinishedTask
- type FinishedTasks
- type Logs
- type PopTask
- type RecordUpdate
- type RetrievalTask
- type StageDetails
- type StageDetailsList
- type Status
- type StorageTask
- type Task
- type Tasks
- type Time
- type UpdateTask
Constants ¶
View Source
const (
UndefTime = Time(0)
)
Variables ¶
View Source
var ( TaskPrototype schema.TypedPrototype TasksPrototype schema.TypedPrototype FinishedTaskPrototype schema.TypedPrototype RetrievalTaskPrototype schema.TypedPrototype LogsPrototype schema.TypedPrototype AuthenticatedRecordPrototype schema.TypedPrototype StageDetailsPrototype schema.TypedPrototype StageDetailsListPrototype schema.TypedPrototype CurrentStageDetailsPrototype schema.TypedPrototype StorageTaskPrototype schema.TypedPrototype PopTaskPrototype schema.TypedPrototype UpdatedTaskPrototype schema.TypedPrototype )
Functions ¶
func GetMinerDealTaskStats ¶
func GetMinerDealTaskStats(keyFile string) map[string]*DealTaskStats
func MkLinkSystem ¶
func MkLinkSystem(bs blockstore.Blockstore, ch chan *FinishedTask) ipld.LinkSystem
Types ¶
type AuthenticatedRecord ¶
type AuthenticatedRecord struct { Record ipld.Link Signature []byte }
type DealTaskStats ¶
type FinishedTask ¶
type FinishedTask struct { Status Status StartedAt Time ErrorMessage *string RetrievalTask *RetrievalTask StorageTask *StorageTask DealID int64 MinerMultiAddr string ClientApparentAddr string MinerLatencyMS *int64 TimeToFirstByteMS *int64 TimeToLastByteMS *int64 Events ipld.Link MinerVersion *string ClientVersion *string Size *int64 PayloadCID *string ProposalCID *string DealIDString *string MinerPeerID *string }
func UnwrapFinishedTask ¶
func UnwrapFinishedTask(node ipld.Node) (*FinishedTask, error)
func (*FinishedTask) ToNode ¶
func (f *FinishedTask) ToNode() (n ipld.Node, err error)
type FinishedTasks ¶
type FinishedTasks []FinishedTask
type PopTask ¶
func UnwrapPopTask ¶
type RecordUpdate ¶
type RecordUpdate struct { Records []*AuthenticatedRecord SigPrev []byte Previous *ipld.Link }
type RetrievalTask ¶
type RetrievalTask struct { Miner string PayloadCID string CARExport bool Schedule *string ScheduleLimit *string Tag *string MaxPriceAttoFIL *int }
func UnwrapRetrievalTask ¶
func UnwrapRetrievalTask(node ipld.Node) (*RetrievalTask, error)
func (*RetrievalTask) ToNode ¶
func (r *RetrievalTask) ToNode() (n ipld.Node, err error)
type StageDetails ¶
type StageDetailsList ¶
type StageDetailsList []*StageDetails
func UnwrapStageDetailsList ¶
func UnwrapStageDetailsList(node ipld.Node) (*StageDetailsList, error)
func (*StageDetailsList) ToNode ¶
func (sdl *StageDetailsList) ToNode() (n ipld.Node, err error)
type StorageTask ¶
type StorageTask struct { Miner string MaxPriceAttoFIL int64 Size int64 StartOffset int64 FastRetrieval bool Verified bool Schedule *string ScheduleLimit *string Tag *string RetrievalSchedule *string RetrievalScheduleLimit *string RetrievalMaxPriceAttoFIL *int64 }
func UnwrapStorageTask ¶
func UnwrapStorageTask(node ipld.Node) (*StorageTask, error)
func (*StorageTask) ToNode ¶
func (s *StorageTask) ToNode() (n ipld.Node, err error)
type Task ¶
type Task struct { UUID string Status Status WorkedBy string Stage string CurrentStageDetails *StageDetails PastStageDetails StageDetailsList StartedAt Time RunCount int64 ErrorMessage string RetrievalTask *RetrievalTask StorageTask *StorageTask }
func UnwrapTask ¶
UnwrapTask unwraps the given node as a Task.
Note that the node is reassigned to TaskPrototype if its prototype is different. Therefore, it is recommended to load the node using the correct prototype initially function to avoid unnecessary node assignment.
type UpdateTask ¶
type UpdateTask struct { Status Status ErrorMessage string Stage string CurrentStageDetails *StageDetails WorkedBy string RunCount int64 }
func UnwrapUpdateTask ¶
func UnwrapUpdateTask(node ipld.Node) (*UpdateTask, error)
func (*UpdateTask) ToNode ¶
func (u *UpdateTask) ToNode() (n ipld.Node, err error)
Click to show internal directories.
Click to hide internal directories.