console

package
v1.104.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SNOServiceErr defines sno service error.
	SNOServiceErr = errs.Class("console")
)

Functions

This section is empty.

Types

type Audits added in v1.11.1

type Audits struct {
	AuditScore      float64 `json:"auditScore"`
	SuspensionScore float64 `json:"suspensionScore"`
	OnlineScore     float64 `json:"onlineScore"`
	SatelliteName   string  `json:"satelliteName"`
}

Audits represents audit, suspension and online scores of SNO across all satellites.

type BandwidthInfo

type BandwidthInfo struct {
	Used      int64 `json:"used"`
	Available int64 `json:"available"`
}

BandwidthInfo stores all info about storage node bandwidth usage.

type Dashboard added in v0.18.0

type Dashboard struct {
	NodeID         storj.NodeID `json:"nodeID"`
	Wallet         string       `json:"wallet"`
	WalletFeatures []string     `json:"walletFeatures"`

	Satellites []SatelliteInfo `json:"satellites"`

	DiskSpace DiskSpaceInfo `json:"diskSpace"`
	Bandwidth BandwidthInfo `json:"bandwidth"`

	LastPinged time.Time `json:"lastPinged"`

	Version        version.SemVer `json:"version"`
	AllowedVersion version.SemVer `json:"allowedVersion"`
	UpToDate       bool           `json:"upToDate"`

	StartedAt time.Time `json:"startedAt"`

	ConfiguredPort   string    `json:"configuredPort"`
	QUICStatus       string    `json:"quicStatus"`
	LastQUICPingedAt time.Time `json:"lastQuicPingedAt"`
}

Dashboard encapsulates dashboard stale data.

type DiskSpaceInfo

type DiskSpaceInfo struct {
	Used      int64 `json:"used"`
	Available int64 `json:"available"`
	Trash     int64 `json:"trash"`
	Overused  int64 `json:"overused"`
}

DiskSpaceInfo stores all info about storagenode disk space usage.

type PriceModel added in v1.3.2

type PriceModel struct {
	EgressBandwidth int64
	RepairBandwidth int64
	AuditBandwidth  int64
	DiskSpace       int64
}

PriceModel is a satellite prices for storagenode usage TB/H.

type Satellite added in v0.18.0

type Satellite struct {
	ID                 storj.NodeID            `json:"id"`
	StorageDaily       []storageusage.Stamp    `json:"storageDaily"`
	BandwidthDaily     []bandwidth.UsageRollup `json:"bandwidthDaily"`
	StorageSummary     float64                 `json:"storageSummary"`
	AverageUsageBytes  float64                 `json:"averageUsageBytes"`
	BandwidthSummary   int64                   `json:"bandwidthSummary"`
	EgressSummary      int64                   `json:"egressSummary"`
	IngressSummary     int64                   `json:"ingressSummary"`
	CurrentStorageUsed int64                   `json:"currentStorageUsed"`
	Audits             Audits                  `json:"audits"`
	AuditHistory       reputation.AuditHistory `json:"auditHistory"`
	PriceModel         PriceModel              `json:"priceModel"`
	NodeJoinedAt       time.Time               `json:"nodeJoinedAt"`
}

Satellite encapsulates satellite related data.

type SatelliteInfo added in v0.21.0

type SatelliteInfo struct {
	ID                 storj.NodeID `json:"id"`
	URL                string       `json:"url"`
	Disqualified       *time.Time   `json:"disqualified"`
	Suspended          *time.Time   `json:"suspended"`
	CurrentStorageUsed int64        `json:"currentStorageUsed"`
}

SatelliteInfo encapsulates satellite ID and disqualification.

type Satellites added in v0.18.0

type Satellites struct {
	StorageDaily      []storageusage.StampGroup `json:"storageDaily"`
	BandwidthDaily    []bandwidth.UsageRollup   `json:"bandwidthDaily"`
	StorageSummary    float64                   `json:"storageSummary"`
	AverageUsageBytes float64                   `json:"averageUsageBytes"`
	BandwidthSummary  int64                     `json:"bandwidthSummary"`
	EgressSummary     int64                     `json:"egressSummary"`
	IngressSummary    int64                     `json:"ingressSummary"`
	EarliestJoinedAt  time.Time                 `json:"earliestJoinedAt"`
	Audits            []Audits                  `json:"audits"`
}

Satellites represents consolidated data across all satellites.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is handling storage node operator related logic.

architecture: Service

func NewService

func NewService(log *zap.Logger, bandwidth bandwidth.DB, pieceStore *pieces.Store, version *checker.Service,
	allocatedDiskSpace memory.Size, walletAddress string, versionInfo version.Info, trust *trust.Pool,
	reputationDB reputation.DB, storageUsageDB storageusage.DB, pricingDB pricing.DB, satelliteDB satellites.DB,
	pingStats *contact.PingStats, contact *contact.Service, estimation *estimatedpayouts.Service, usageCache *pieces.BlobsUsageCache,
	walletFeatures operator.WalletFeatures, port string, quicStats *contact.QUICStats) (*Service, error)

NewService returns new instance of Service.

func (*Service) GetAllSatellitesData added in v0.18.0

func (s *Service) GetAllSatellitesData(ctx context.Context) (_ *Satellites, err error)

GetAllSatellitesData returns bandwidth and storage daily usage consolidate among all satellites from the node's trust pool.

func (*Service) GetAllSatellitesEstimatedPayout added in v1.6.1

func (s *Service) GetAllSatellitesEstimatedPayout(ctx context.Context, now time.Time) (estimatedPayout estimatedpayouts.EstimatedPayout, err error)

GetAllSatellitesEstimatedPayout returns estimated payouts for current and previous months for all satellites.

func (*Service) GetDashboardData added in v0.18.0

func (s *Service) GetDashboardData(ctx context.Context) (_ *Dashboard, err error)

GetDashboardData returns stale dashboard data.

func (*Service) GetSatelliteData added in v0.18.0

func (s *Service) GetSatelliteData(ctx context.Context, satelliteID storj.NodeID) (_ *Satellite, err error)

GetSatelliteData returns satellite related data.

func (*Service) GetSatelliteEstimatedPayout added in v1.6.1

func (s *Service) GetSatelliteEstimatedPayout(ctx context.Context, satelliteID storj.NodeID, now time.Time) (estimatedPayout estimatedpayouts.EstimatedPayout, err error)

GetSatelliteEstimatedPayout returns estimated payouts for current and previous months for selected satellite.

func (*Service) GetSatellitePricingModel added in v1.79.1

func (s *Service) GetSatellitePricingModel(ctx context.Context, satelliteID storj.NodeID) (pricingModel *pricing.Pricing, err error)

GetSatellitePricingModel returns pricing model for the specified satellite.

func (*Service) VerifySatelliteID added in v0.18.0

func (s *Service) VerifySatelliteID(ctx context.Context, satelliteID storj.NodeID) (err error)

VerifySatelliteID verifies if the satellite belongs to the trust pool.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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