model

package
v2.6.20 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilecoinInfo

type FilecoinInfo struct {
	RelativePower    float64   `bson:"relative_power"`
	AskPrice         string    `bson:"ask_price"`
	AskVerifiedPrice string    `bson:"ask_verified_price"`
	MinPieceSize     int64     `bson:"min_piece_size"`
	MaxPieceSize     int64     `bson:"max_piece_size"`
	SectorSize       int64     `bson:"sector_size"`
	ActiveSectors    int64     `bson:"active_sectors"`
	FaultySectors    int64     `bson:"faulty_sectors"`
	UpdatedAt        time.Time `bson:"updated_at"`
}

type MetadataInfo

type MetadataInfo struct {
	Location  string    `bson:"location"`
	URL       string    `bson:"url"`
	Email     string    `bson:"email"`
	Twitter   string    `bson:"twitter"`
	MinerX    bool      `bson:"minerx"`
	UpdatedAt time.Time `bson:"updated_at"`
}

type MinerInfo

type MinerInfo struct {
	MinerID   string       `bson:"_id"`
	Metadata  MetadataInfo `bson:"metadata"`
	Filecoin  FilecoinInfo `bson:"filecoin"`
	Textile   TextileInfo  `bson:"textile"`
	UpdatedAt time.Time    `bson:"updated_at"`
}

type MinerInfoSnapshot

type MinerInfoSnapshot struct {
	CreatedAt time.Time `bson:"created_at"`
	MinerInfo MinerInfo `bson:"miner_info"`
}

type PowRetrievalRecord

type PowRetrievalRecord struct {
	ID                string                     `bson:"id"`
	Address           string                     `bson:"address"`
	DealInfo          PowRetrievalRecordDealInfo `bson:"deal_info"`
	DataTransferStart time.Time                  `bson:"datatransfer_start"`
	DataTransferEnd   time.Time                  `bson:"datatransfer_end"`
	BytesReceived     uint64                     `bson:"bytes_received"`
	Failed            bool                       `bson:"failed"`
	ErrMsg            string                     `bson:"err_msg"`
	CreatedAt         int64                      `bson:"created_at"`
	UpdatedAt         time.Time                  `bson:"updated_at"`
}

type PowRetrievalRecordDealInfo

type PowRetrievalRecordDealInfo struct {
	RootCid  string `bson:"root_cid"`
	Size     uint64 `bson:"size"`
	MinPrice uint64 `bson:"min_price"`
	Miner    string `bson:"miner"`
}

type PowStorageDealRecord

type PowStorageDealRecord struct {
	RootCid           string                       `bson:"root_cid"`
	Address           string                       `bson:"address"`
	Pending           bool                         `bson:"pending"`
	DealInfo          PowStorageDealRecordDealInfo `bson:"deal_info"`
	TransferSize      int64                        `bson:"transfer_size"`
	DataTransferStart time.Time                    `bson:"datatransfer_start"`
	DataTransferEnd   time.Time                    `bson:"datatransfer_end"`
	SealingStart      time.Time                    `bson:"sealing_start"`
	SealingEnd        time.Time                    `bson:"sealing_end"`
	Failed            bool                         `bson:"failed"`
	ErrMsg            string                       `bson:"err_msg"`
	CreatedAt         int64                        `bson:"created_at"`
	UpdatedAt         time.Time                    `bson:"updated_at"`
}

type PowStorageDealRecordDealInfo

type PowStorageDealRecordDealInfo struct {
	ProposalCid     string `bson:"proposal_cid"`
	StateId         uint64 `bson:"state_id"`
	StateName       string `bson:"state_name"`
	Miner           string `bson:"miner"`
	PieceCid        string `bson:"piece_cid"`
	Size            uint64 `bson:"size"`
	PricePerEpoch   uint64 `bson:"price_per_epoch"`
	StartEpoch      uint64 `bson:"start_epoch"`
	Duration        uint64 `bson:"duration"`
	DealId          uint64 `bson:"deal_id"`
	ActivationEpoch int64  `bson:"activation_epoch"`
	Message         string `bson:"message"`
}

type PowTarget

type PowTarget struct {
	Name        string `bson:"_id"`
	Region      string `bson:"region"`
	APIEndpoint string `bson:"api_endpoint"`
	AdminToken  string `bson:"admin_token"`
}

PowTarget describes a Powergate instance to collect deal/retrieval records.

func (*PowTarget) String

func (pt *PowTarget) String() string

type RetrievalRecord

type RetrievalRecord struct {
	ID                 string             `bson:"_id,omitempty"`
	PowName            string             `bson:"pow_name"`
	Region             string             `bson:"region"`
	LastUpdatedAt      time.Time          `bson:"last_updated_at"`
	PowRetrievalRecord PowRetrievalRecord `bson:"pow_retrieval_record"`
}

type SealedDurationMins

type SealedDurationMins struct {
	SealedAt        time.Time `bson:"sealed_at"`
	DurationSeconds int       `bson:"duration_mins"`
}

type StorageDealRecord

type StorageDealRecord struct {
	ID                   string               `bson:"_id,omitempty"`
	PowName              string               `bson:"pow_name"`
	Region               string               `bson:"region"`
	LastUpdatedAt        time.Time            `bson:"last_updated_at"`
	PowStorageDealRecord PowStorageDealRecord `bson:"pow_storage_deal_record"`
}

type TextileDealsInfo

type TextileDealsInfo struct {
	Total int       `bson:"total"`
	Last  time.Time `bson:"last"`

	Failures    int       `bson:"failures"`
	LastFailure time.Time `bson:"last_failure"`

	TailTransfers []TransferMiBPerSec  `bson:"tail_transfers"`
	TailSealed    []SealedDurationMins `bson:"tail_sealed"`
}

type TextileDealsSummary

type TextileDealsSummary struct {
	Total       int       `bson:"total"`
	Last        time.Time `bson:"last"`
	Failures    int       `bson:"failures"`
	LastFailure time.Time `bson:"last_failure"`
}

type TextileInfo

type TextileInfo struct {
	Regions           map[string]TextileRegionInfo `bson:"regions"`
	DealsSummary      TextileDealsSummary          `bson:"deals_summary"`
	RetrievalsSummary TextileRetrievalSummary      `bson:"retrievals_summary"`
	UpdatedAt         time.Time                    `bson:"updated_at"`
}

type TextileRegionInfo

type TextileRegionInfo struct {
	Deals      TextileDealsInfo      `bson:"deals"`
	Retrievals TextileRetrievalsInfo `bson:"retrievals"`
}

type TextileRetrievalSummary

type TextileRetrievalSummary struct {
	Total       int       `bson:"total"`
	Last        time.Time `bson:"last"`
	Failures    int       `bson:"failures"`
	LastFailure time.Time `bson:"last_failure"`
}

type TextileRetrievalsInfo

type TextileRetrievalsInfo struct {
	Total         int                 `bson:"total"`
	Last          time.Time           `bson:"last"`
	Failures      int                 `bson:"failures"`
	LastFailure   time.Time           `bson:"last_failure"`
	TailTransfers []TransferMiBPerSec `bson:"tail_transfers"`
}

type TransferMiBPerSec

type TransferMiBPerSec struct {
	TransferedAt time.Time `bson:"transfered_at"`
	MiBPerSec    float64   `bson:"mib_per_sec"`
}

Jump to

Keyboard shortcuts

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