console

package
v0.34.1-rc Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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

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"`

	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"`
	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"`
}

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"`
	EgressSummary    int64                   `json:"egressSummary"`
	IngressSummary   int64                   `json:"ingressSummary"`
	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"`
	URL          string       `json:"url"`
	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"`
	EgressSummary    int64                   `json:"egressSummary"`
	IngressSummary   int64                   `json:"ingressSummary"`
}

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

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) 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