Documentation ¶
Index ¶
- Variables
- type BandwidthInfo
- type Dashboard
- type DiskSpaceInfo
- type Satellite
- type SatelliteInfo
- type Satellites
- type Service
- func (s *Service) GetAllSatellitesData(ctx context.Context) (_ *Satellites, 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) VerifySatelliteID(ctx context.Context, satelliteID storj.NodeID) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SNOServiceErr defines sno service error. SNOServiceErr = errs.Class("storage node dashboard service error") )
Functions ¶
This section is empty.
Types ¶
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"` LastPingFromID storj.NodeID `json:"lastPingFromID"` LastPingFromAddress string `json:"lastPingFromAddress"` Version version.SemVer `json:"version"` UpToDate bool `json:"upToDate"` StartedAt time.Time `json:"startedAt"` }
Dashboard encapsulates dashboard stale data.
type DiskSpaceInfo ¶
DiskSpaceInfo stores all info about storagenode disk space usage
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"` Audit reputation.Metric `json:"audit"` Uptime reputation.Metric `json:"uptime"` }
Satellite encapsulates satellite related data.
type SatelliteInfo ¶ added in v0.21.0
type SatelliteInfo struct { ID storj.NodeID `json:"id"` Disqualified *time.Time `json:"disqualified"` }
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"` }
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, allocatedBandwidth, allocatedDiskSpace memory.Size, walletAddress string, versionInfo version.Info, trust *trust.Pool, reputationDB reputation.DB, storageUsageDB storageusage.DB, pingStats *contact.PingStats, contact *contact.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) GetDashboardData ¶ added in v0.18.0
GetDashboardData returns stale dashboard data.
Click to show internal directories.
Click to hide internal directories.