Documentation ¶
Index ¶
- Variables
- type Audits
- type BandwidthInfo
- type Dashboard
- type DiskSpaceInfo
- type PriceModel
- type Satellite
- type SatelliteInfo
- type Satellites
- type Service
- func (s *Service) GetAllSatellitesData(ctx context.Context) (_ *Satellites, err error)
- func (s *Service) GetAllSatellitesEstimatedPayout(ctx context.Context) (estimatedPayout estimatedpayout.EstimatedPayout, err error)
- func (s *Service) GetDashboardData(ctx context.Context) (_ *Dashboard, err error)
- func (s *Service) GetSatelliteData(ctx context.Context, satelliteID storj.NodeID) (_ *Satellite, err error)
- func (s *Service) GetSatelliteEstimatedPayout(ctx context.Context, satelliteID storj.NodeID) (estimatedPayout estimatedpayout.EstimatedPayout, err error)
- func (s *Service) VerifySatelliteID(ctx context.Context, satelliteID storj.NodeID) (err error)
Constants ¶
This section is empty.
Variables ¶
var ( // SNOServiceErr defines sno service error. SNOServiceErr = errs.Class("storage node dashboard service error") )
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 ¶
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"` 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"` }
Dashboard encapsulates dashboard stale data.
type DiskSpaceInfo ¶
type DiskSpaceInfo struct { Used int64 `json:"used"` Available int64 `json:"available"` Trash int64 `json:"trash"` }
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"` BandwidthSummary int64 `json:"bandwidthSummary"` EgressSummary int64 `json:"egressSummary"` IngressSummary int64 `json:"ingressSummary"` Audit reputation.Metric `json:"audit"` Uptime reputation.Metric `json:"uptime"` OnlineScore float64 `json:"onlineScore"` 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"` }
SatelliteInfo encapsulates satellite ID and disqualification.
type Satellites ¶ added in v0.18.0
type Satellites struct { StorageDaily []storageusage.Stamp `json:"storageDaily"` BandwidthDaily []bandwidth.UsageRollup `json:"bandwidthDaily"` StorageSummary float64 `json:"storageSummary"` 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 *estimatedpayout.Service) (*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) (estimatedPayout estimatedpayout.EstimatedPayout, err error)
GetAllSatellitesEstimatedPayout returns estimated payout for current and previous months for all satellites.
func (*Service) GetDashboardData ¶ added in v0.18.0
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) (estimatedPayout estimatedpayout.EstimatedPayout, err error)
GetSatelliteEstimatedPayout returns estimated payout for current and previous months for selected satellite.