pando

package
v0.0.0-...-d0a0e58 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 28 Imported by: 0

Documentation

Index

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 Count

type Count struct {
	Success int64
	Failed  int64
}

type DealTaskStats

type DealTaskStats struct {
	Retrieval Count
	Storage   Count
}

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 Logs

type Logs struct {
	Log       string
	UpdatedAt Time
}

type PopTask

type PopTask struct {
	Status   Status
	WorkedBy string
	Tag      []string
}

func UnwrapPopTask

func UnwrapPopTask(node ipld.Node) (*PopTask, error)

func (*PopTask) ToNode

func (pt *PopTask) ToNode() (n ipld.Node, err error)

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 StageDetails struct {
	Description      string
	ExpectedDuration string
	Logs             []*Logs
	UpdatedAt        Time
}

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 Status

type Status int64

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

func UnwrapTask(node ipld.Node) (*Task, error)

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.

func (*Task) ToNode

func (t *Task) ToNode() (n ipld.Node, err error)

type Tasks

type Tasks []Task

func NewTasks

func NewTasks(ts []*Task) *Tasks

func UnwrapTasks

func UnwrapTasks(node ipld.Node) (*Tasks, error)

func (*Tasks) ToNode

func (ts *Tasks) ToNode() (n ipld.Node, err error)

type Time

type Time int64

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)

Jump to

Keyboard shortcuts

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