model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Address dTypes.Address `json:"address"`
	Layers  []string       `json:"layers,omitempty"`
	// contains filtered or unexported fields
}

func (*Actor) ChainActor

func (a *Actor) ChainActor(ctx context.Context, api v1api.FullNode) (*types.Actor, error)

func (*Actor) MinerState

func (a *Actor) MinerState(ctx context.Context, api v1api.FullNode) (miner.State, error)

func (*Actor) Power

func (a *Actor) Power(ctx context.Context, api v1api.FullNode) (*api.MinerPower, error)

type ActorDeadline

type ActorDeadline struct {
	Empty      bool `json:"empty"`
	Current    bool `json:"current"`
	Proven     bool `json:"proven"`
	PartFaulty bool `json:"partFaulty"`
	Faulty     bool `json:"faulty"`
}

type Alert

type Alert struct {
	ID          int    `json:"id"`
	MachineName string `json:"machineName"`
	Message     string `json:"message"`
}

type Config

type Config struct {
	ID     int    `json:"id"`
	Title  string `json:"title"`
	Config string `json:"config"`
}

type GaugeCountValue added in v0.0.4

type GaugeCountValue struct {
	Key   string `json:"key"`
	Value int    `json:"value"`
}

type Machine

type Machine struct {
	ID          int       `json:"id" db:"id"`
	LastContact time.Time `json:"lastContact" db:"last_contact"`
	HostAndPort string    `json:"hostAndPort" db:"host_and_port"`
	CPU         int       `json:"cpu" db:"cpu"`
	RAM         int       `json:"ram" db:"ram"`
	Gpu         float64   `json:"gpu" db:"gpu"`
}

type MachineDetail

type MachineDetail struct {
	ID          int       `json:"id"`
	MachineName string    `json:"machineName"`
	Tasks       string    `json:"tasks"`
	TasksArray  []string  `json:"tasksArray"`
	Layers      string    `json:"layers"`
	LayersArray []string  `json:"layersArray"`
	StartupTime time.Time `json:"startupTime"`
	Miners      string    `json:"miners"`
	MinersArray []string  `json:"minersArray"`
	MachineID   int       `json:"machineId"`
}

type MachineMetrics added in v0.0.4

type MachineMetrics struct {
	CPUUsage                   float64            `json:"cpuUsage"`
	GpuUsage                   float64            `json:"gpuUsage"`
	RAMUsage                   float64            `json:"ramUsage"`
	ActiveTasks                []*GaugeCountValue `json:"activeTasks"`
	AddedTasks                 []*GaugeCountValue `json:"addedTasks"`
	TasksCompleted             []*GaugeCountValue `json:"tasksCompleted"`
	TasksStarted               []*GaugeCountValue `json:"tasksStarted"`
	GoRoutines                 int                `json:"goRoutines"`
	GoVersion                  string             `json:"goVersion"`
	GoThreads                  int                `json:"goThreads"`
	ProcessCPUSecondsTotal     int                `json:"processCpuSecondsTotal"`
	ProcessStartTimeSeconds    int                `json:"processStartTimeSeconds"`
	ProcessVirtualMemoryBytes  int                `json:"processVirtualMemoryBytes"`
	ProcessResidentMemoryBytes int                `json:"processResidentMemoryBytes"`
	ProcessOpenFds             int                `json:"processOpenFds"`
	ProcessMaxFds              int                `json:"processMaxFds"`
}

type MachineSummary

type MachineSummary struct{}

type MetricsActiveTask

type MetricsActiveTask struct {
	Name   string      `json:"name"`
	Series [][]float64 `json:"series"`
}

type Miner

type Miner struct {
}

type MinerBeneficiaryTerm

type MinerBeneficiaryTerm struct {
	Quota      types.BigInt `json:"quota"`
	UsedQuota  int          `json:"usedQuota"`
	Expiration int          `json:"expiration"`
}

type MinerInfo

type MinerInfo struct {
	Owner                      types.Address                  `json:"owner"`
	Worker                     types.Address                  `json:"worker"`
	NewWorker                  types.Address                  `json:"newWorker"`
	ControlAddresses           []*types.Address               `json:"controlAddresses"`
	WorkerChangeEpoch          int                            `json:"workerChangeEpoch"`
	PeerID                     *string                        `json:"peerId"`
	MultiAddrs                 []string                       `json:"multiAddrs"`
	WindowPoStProofType        int                            `json:"windowPoStProofType"`
	SectorSize                 int                            `json:"sectorSize"`
	WindowPoStPartitionSectors int                            `json:"windowPoStPartitionSectors"`
	ConsensusFaultElapsed      int                            `json:"consensusFaultElapsed"`
	PendingOwnerAddress        *types.Address                 `json:"pendingOwnerAddress"`
	Beneficiary                types.Address                  `json:"beneficiary"`
	BeneficiaryTerm            *MinerBeneficiaryTerm          `json:"beneficiaryTerm"`
	PendingBeneficiaryChange   *MinerPendingBeneficiaryChange `json:"pendingBeneficiaryChange"`
}

type MinerPendingBeneficiaryChange

type MinerPendingBeneficiaryChange struct {
	NewBeneficiary        *types.Address `json:"newBeneficiary"`
	NewQuota              types.BigInt   `json:"newQuota"`
	NewExpiration         int            `json:"newExpiration"`
	ApprovedByBeneficiary bool           `json:"approvedByBeneficiary"`
	ApprovedByNominee     bool           `json:"approvedByNominee"`
}

type MinerPower

type MinerPower struct {
	ID          string      `json:"id"`
	MinerPower  *PowerClaim `json:"minerPower"`
	TotalPower  *PowerClaim `json:"totalPower"`
	HasMinPower bool        `json:"hasMinPower"`
}

type MiningSummaryDay

type MiningSummaryDay struct {
	Day      time.Time     `json:"day"`
	Miner    types.ActorID `json:"miner"`
	WonBlock int           `json:"wonBlock"`
}

type Mutation

type Mutation struct {
}

type NodeInfo

type NodeInfo struct {
	ID        string   `json:"id"`
	Address   string   `json:"address"`
	Layers    []string `json:"layers"`
	Reachable bool     `json:"reachable"`
	SyncState string   `json:"syncState"`
	Version   string   `json:"version"`
}

type OpenSectorPiece

type OpenSectorPiece struct {
	SpID                          types.ActorID `json:"spID"`
	SectorNumber                  int           `json:"sectorNumber"`
	PieceIndex                    int           `json:"pieceIndex"`
	PieceCid                      string        `json:"pieceCID"`
	PieceSize                     int           `json:"pieceSize"`
	DataURL                       string        `json:"dataURL"`
	DataHeaders                   string        `json:"dataHeaders"`
	DataRawSize                   int           `json:"dataRawSize"`
	DataDeleteOnFinalize          bool          `json:"dataDeleteOnFinalize"`
	F05PublishCid                 *string       `json:"f05PublishCID"`
	F05DealID                     *int          `json:"f05DealID"`
	F05DealProposal               *string       `json:"f05DealProposal"`
	F05DealStartEpoch             *int          `json:"f05DealStartEpoch"`
	F05DealEndEpoch               *int          `json:"f05DealEndEpoch"`
	DirectStartEpoch              *int          `json:"directStartEpoch"`
	DirectEndEpoch                *int          `json:"directEndEpoch"`
	DirectPieceActivationManifest *string       `json:"directPieceActivationManifest"`
	CreatedAt                     time.Time     `json:"createdAt"`
	IsSnap                        bool          `json:"isSnap"`
}

type Pipeline

type Pipeline struct {
	ID                       string          `json:"id"`
	SpID                     types.ActorID   `json:"spId"`
	SectorNumber             int             `json:"sectorNumber"`
	CreateTime               time.Time       `json:"createTime"`
	RegSealProof             int             `json:"regSealProof"`
	TicketEpoch              *int            `json:"ticketEpoch"`
	TicketValue              types.ByteArray `json:"ticketValue"`
	TaskIDSdr                *int            `json:"taskIdSdr"`
	AfterSdr                 bool            `json:"afterSdr"`
	TreeDCid                 *string         `json:"treeDCid"`
	TaskIDTreeD              *int            `json:"taskIdTreeD"`
	AfterTreeD               bool            `json:"afterTreeD"`
	TaskIDTreeC              *int            `json:"taskIdTreeC"`
	AfterTreeC               bool            `json:"afterTreeC"`
	TreeRCid                 *string         `json:"treeRCid"`
	TaskIDTreeR              *int            `json:"taskIdTreeR"`
	AfterTreeR               bool            `json:"afterTreeR"`
	PrecommitMsgCid          *string         `json:"precommitMsgCid"`
	TaskIDPrecommitMsg       *int            `json:"taskIdPrecommitMsg"`
	AfterPrecommitMsg        bool            `json:"afterPrecommitMsg"`
	SeedEpoch                *int            `json:"seedEpoch"`
	PrecommitMsgTsk          types.ByteArray `json:"precommitMsgTsk"`
	AfterPrecommitMsgSuccess bool            `json:"afterPrecommitMsgSuccess"`
	SeedValue                types.ByteArray `json:"seedValue"`
	TaskIDPorep              *int            `json:"taskIdPorep"`
	PorepProof               types.ByteArray `json:"porepProof"`
	AfterPorep               bool            `json:"afterPorep"`
	TaskIDFinalize           *int            `json:"taskIdFinalize"`
	AfterFinalize            bool            `json:"afterFinalize"`
	TaskIDMoveStorage        *int            `json:"taskIdMoveStorage"`
	AfterMoveStorage         bool            `json:"afterMoveStorage"`
	CommitMsgCid             *string         `json:"commitMsgCid"`
	TaskIDCommitMsg          *int            `json:"taskIdCommitMsg"`
	AfterCommitMsg           bool            `json:"afterCommitMsg"`
	CommitMsgTsk             types.ByteArray `json:"commitMsgTsk"`
	AfterCommitMsgSuccess    bool            `json:"afterCommitMsgSuccess"`
	Failed                   bool            `json:"failed"`
	FailedAt                 *time.Time      `json:"failedAt"`
	FailedReason             string          `json:"failedReason"`
	FailedReasonMsg          string          `json:"failedReasonMsg"`
	TaskIDSynth              *int            `json:"taskIdSynth"`
	AfterSynth               bool            `json:"afterSynth"`
	UserSectorDurationEpochs *int            `json:"userSectorDurationEpochs"`
	Status                   PipelineStatus  `json:"status"`
	CurrentTask              *Task           `json:"currentTask"`
}

type PipelineStatus

type PipelineStatus string
const (
	PipelineStatusSdr              PipelineStatus = "SDR"
	PipelineStatusTreeD            PipelineStatus = "TreeD"
	PipelineStatusTreeRc           PipelineStatus = "TreeRC"
	PipelineStatusSynthetic        PipelineStatus = "Synthetic"
	PipelineStatusPreCommitMsg     PipelineStatus = "PreCommitMsg"
	PipelineStatusPreCommitMsgWait PipelineStatus = "PreCommitMsgWait"
	PipelineStatusWaitSeed         PipelineStatus = "WaitSeed"
	PipelineStatusPoRep            PipelineStatus = "PoRep"
	PipelineStatusClearCache       PipelineStatus = "ClearCache"
	PipelineStatusMoveStorage      PipelineStatus = "MoveStorage"
	PipelineStatusCommitMsg        PipelineStatus = "CommitMsg"
	PipelineStatusCommitMsgWait    PipelineStatus = "CommitMsgWait"
	PipelineStatusFailed           PipelineStatus = "Failed"
	PipelineStatusSuccess          PipelineStatus = "Success"
	PipelineStatusUnknown          PipelineStatus = "Unknown"
)

func (PipelineStatus) IsValid

func (e PipelineStatus) IsValid() bool

func (PipelineStatus) MarshalGQL

func (e PipelineStatus) MarshalGQL(w io.Writer)

func (PipelineStatus) String

func (e PipelineStatus) String() string

func (*PipelineStatus) UnmarshalGQL

func (e *PipelineStatus) UnmarshalGQL(v interface{}) error

type PipelineSummary

type PipelineSummary struct {
	ID types.ActorID `json:"id" db:"sp_id"`
}

type PowerClaim

type PowerClaim struct {
	RawBytePower    *types.BigInt `json:"rawBytePower"`
	QualityAdjPower *types.BigInt `json:"qualityAdjPower"`
}

type Query

type Query struct {
}

type Sector

type Sector struct {
	SpID      types.ActorID
	SectorNum int
	Meta      *SectorMeta `json:"meta,omitempty"`
}

type SectorLocation

type SectorLocation struct {
	MinerID        types.ActorID `json:"minerId"`
	SectorNum      int           `json:"sectorNum"`
	SectorFiletype int           `json:"sectorFiletype"`
	StorageID      string        `json:"storageId"`
	IsPrimary      *bool         `json:"isPrimary"`
	ReadTs         *string       `json:"readTs"`
	ReadRefs       int           `json:"readRefs"`
	WriteTs        *string       `json:"writeTs"`
	WriteLockOwner *string       `json:"writeLockOwner"`
}

type SectorMeta

type SectorMeta struct {
	SpID            types.ActorID   `json:"spId"`
	SectorNum       int             `json:"sectorNum"`
	RegSealProof    int             `json:"regSealProof"`
	TicketEpoch     int             `json:"ticketEpoch"`
	TicketValue     types.ByteArray `json:"ticketValue,omitempty"`
	OrigSealedCid   string          `json:"origSealedCid"`
	OrigUnsealedCid string          `json:"origUnsealedCid"`
	CurSealedCid    string          `json:"curSealedCid"`
	CurUnsealedCid  string          `json:"curUnsealedCid"`
	MsgCidPrecommit *string         `json:"msgCidPrecommit,omitempty"`
	MsgCidCommit    *string         `json:"msgCidCommit,omitempty"`
	MsgCidUpdate    *string         `json:"msgCidUpdate,omitempty"`
	SeedEpoch       int             `json:"seedEpoch"`
	SeedValue       types.ByteArray `json:"seedValue,omitempty"`
	ExpirationEpoch int             `json:"expirationEpoch"`
	IsCC            bool            `json:"isCC"`
	Deadline        *int            `json:"deadline"`
	Partition       *int            `json:"partition"`
}

type SectorMetaPiece

type SectorMetaPiece struct {
	SpID              types.ActorID `json:"spID"`
	SectorNum         int           `json:"sectorNum"`
	PieceNum          int           `json:"pieceNum"`
	PieceCid          string        `json:"pieceCID"`
	PieceSize         int           `json:"pieceSize"`
	RequestedKeepData bool          `json:"requestedKeepData"`
	RawDataSize       *int          `json:"rawDataSize"`
	StartEpoch        *int          `json:"startEpoch"`
	OrigEndEpoch      *int          `json:"origEndEpoch"`
	F05DealID         *int          `json:"f05DealID"`
	DdoPam            types.JSONB   `json:"ddoPam"`
	F05DealProposal   types.JSONB   `json:"f05DealProposal"`
}

type StoragePath

type StoragePath struct {
	StorageID     string    `json:"storageId"`
	Urls          string    `json:"urls"`
	Weight        int       `json:"weight"`
	MaxStorage    int       `json:"maxStorage"`
	CanSeal       bool      `json:"canSeal"`
	CanStore      bool      `json:"canStore"`
	Groups        *string   `json:"groups"`
	AllowTo       *string   `json:"allowTo"`
	AllowTypes    *string   `json:"allowTypes"`
	DenyTypes     *string   `json:"denyTypes"`
	Capacity      int       `json:"capacity"`
	Available     int       `json:"available"`
	FsAvailable   int       `json:"fsAvailable"`
	Reserved      int       `json:"reserved"`
	Used          int       `json:"used"`
	LastHeartbeat time.Time `json:"lastHeartbeat"`
	HeartbeatErr  *string   `json:"heartbeatErr"`
	AllowMiners   string    `json:"allowMiners"`
	DenyMiners    string    `json:"denyMiners"`
}

type StorageStats

type StorageStats struct {
	Type             StorageType `json:"type"`
	TotalCapacity    int         `json:"totalCapacity"`
	TotalAvailable   int         `json:"totalAvailable"`
	TotalUsed        int         `json:"totalUsed"`
	TotalReserved    int         `json:"totalReserved"`
	TotalFsAvailable int         `json:"totalFsAvailable"`
}

type StorageType

type StorageType string
const (
	StorageTypeHybrid   StorageType = "Hybrid"
	StorageTypeSeal     StorageType = "Seal"
	StorageTypeStore    StorageType = "Store"
	StorageTypeReadonly StorageType = "Readonly"
)

func (StorageType) IsValid

func (e StorageType) IsValid() bool

func (StorageType) MarshalGQL

func (e StorageType) MarshalGQL(w io.Writer)

func (StorageType) String

func (e StorageType) String() string

func (*StorageType) UnmarshalGQL

func (e *StorageType) UnmarshalGQL(v interface{}) error

type StorageUsage

type StorageUsage struct {
	Time        time.Time `json:"time"`
	Available   int       `json:"available"`
	Used        int       `json:"used"`
	Reserved    int       `json:"reserved"`
	FsAvailable int       `json:"fsAvailable"`
}

type Subscription

type Subscription struct {
}

type Task

type Task struct {
	ID             int       `json:"id" db:"id"`
	InitiatedByID  *int      `json:"initiatedByID,omitempty" db:"initiated_by"`
	UpdateTime     time.Time `json:"updateTime" db:"update_time"`
	PostedTime     time.Time `json:"postedTime" db:"posted_time"`
	OwnerID        *int      `json:"ownerId,omitempty" db:"owner_id"`
	AddedByID      int       `json:"addedByID" db:"added_by"`
	PreviousTaskID *int      `json:"previousTaskID,omitempty" db:"previous_task"`
	Name           string    `json:"name"`
}

type TaskAggregate

type TaskAggregate struct {
	Time    time.Time `json:"time"`
	Total   int       `json:"total"`
	Success int       `json:"success"`
	Failure int       `json:"failure"`
}

type TaskHistoriesAggregateInterval added in v0.0.2

type TaskHistoriesAggregateInterval string
const (
	TaskHistoriesAggregateIntervalDay  TaskHistoriesAggregateInterval = "day"
	TaskHistoriesAggregateIntervalHour TaskHistoriesAggregateInterval = "hour"
)

func (TaskHistoriesAggregateInterval) IsValid added in v0.0.2

func (TaskHistoriesAggregateInterval) MarshalGQL added in v0.0.2

func (e TaskHistoriesAggregateInterval) MarshalGQL(w io.Writer)

func (TaskHistoriesAggregateInterval) String added in v0.0.2

func (*TaskHistoriesAggregateInterval) UnmarshalGQL added in v0.0.2

func (e *TaskHistoriesAggregateInterval) UnmarshalGQL(v interface{}) error

type TaskHistory

type TaskHistory struct {
	ID                     int       `json:"id"`
	TaskID                 int       `json:"taskId"`
	Name                   string    `json:"name"`
	Posted                 time.Time `json:"posted"`
	WorkStart              time.Time `json:"workStart"`
	WorkEnd                time.Time `json:"workEnd"`
	Result                 bool      `json:"result"`
	Err                    *string   `json:"err"`
	CompletedByHostAndPort string    `json:"completedByHostAndPort"`
}

type TaskNameAggregate

type TaskNameAggregate struct {
	Name    string `json:"name"`
	Total   int    `json:"total"`
	Success int    `json:"success"`
	Failure int    `json:"failure"`
}

type TaskSummary

type TaskSummary struct {
	Name       string `json:"name"`
	TrueCount  int    `json:"trueCount"`
	FalseCount int    `json:"falseCount"`
	TotalCount int    `json:"totalCount"`
}

type TaskSummaryDay

type TaskSummaryDay struct {
	Day        time.Time `json:"day"`
	TrueCount  int       `json:"trueCount"`
	FalseCount int       `json:"falseCount"`
	TotalCount int       `json:"totalCount"`
}

Jump to

Keyboard shortcuts

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