Documentation ¶
Index ¶
- type BandwidthInfo
- type DB
- type DiskSpaceInfo
- type Egress
- type Ingress
- type Service
- func (s *Service) CheckVersion(ctx context.Context) (err error)
- func (s *Service) GetBandwidthBySatellite(ctx context.Context, satelliteID storj.NodeID) (_ *BandwidthInfo, err error)
- func (s *Service) GetNodeID(ctx context.Context) storj.NodeID
- func (s *Service) GetSatellites(ctx context.Context) (_ storj.NodeIDList, err error)
- func (s *Service) GetUptime(ctx context.Context) time.Duration
- func (s *Service) GetUsedBandwidthTotal(ctx context.Context) (_ *BandwidthInfo, err error)
- func (s *Service) GetUsedStorageBySatellite(ctx context.Context, satelliteID storj.NodeID) (_ *DiskSpaceInfo, err error)
- func (s *Service) GetUsedStorageTotal(ctx context.Context) (_ *DiskSpaceInfo, err error)
- func (s *Service) GetVersion(ctx context.Context) version.Info
- func (s *Service) GetWalletAddress(ctx context.Context) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BandwidthInfo ¶
type BandwidthInfo struct { Egress Egress `json:"egress"` Ingress Ingress `json:"ingress"` Used int64 `json:"used"` Remaining int64 `json:"remaining"` }
BandwidthInfo stores all info about storage node bandwidth usage
type DB ¶
type DB interface {
GetSatelliteIDs(ctx context.Context, from, to time.Time) (storj.NodeIDList, error)
}
DB exposes methods for managing SNO dashboard related data.
type DiskSpaceInfo ¶
DiskSpaceInfo stores all info about storagenode disk space usage
type Egress ¶
type Egress struct { Repair int64 `json:"repair"` Audit int64 `json:"audit"` Usage int64 `json:"usage"` }
Egress stores info about storage node egress usage
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is handling storage node operator related logic
func NewService ¶
func NewService(log *zap.Logger, consoleDB DB, bandwidth bandwidth.DB, pieceInfo pieces.DB, kademlia *kademlia.Kademlia, version *version.Service, allocatedBandwidth, allocatedDiskSpace memory.Size, walletAddress string, versionInfo version.Info) (*Service, error)
NewService returns new instance of Service
func (*Service) CheckVersion ¶
CheckVersion checks to make sure the version is still okay, returning an error if not
func (*Service) GetBandwidthBySatellite ¶
func (s *Service) GetBandwidthBySatellite(ctx context.Context, satelliteID storj.NodeID) (_ *BandwidthInfo, err error)
GetBandwidthBySatellite returns all info about storage node bandwidth usage by satellite
func (*Service) GetSatellites ¶
GetSatellites used to retrieve satellites list
func (*Service) GetUsedBandwidthTotal ¶
func (s *Service) GetUsedBandwidthTotal(ctx context.Context) (_ *BandwidthInfo, err error)
GetUsedBandwidthTotal returns all info about storage node bandwidth usage
func (*Service) GetUsedStorageBySatellite ¶
func (s *Service) GetUsedStorageBySatellite(ctx context.Context, satelliteID storj.NodeID) (_ *DiskSpaceInfo, err error)
GetUsedStorageBySatellite returns all info about storagenode disk space usage
func (*Service) GetUsedStorageTotal ¶
func (s *Service) GetUsedStorageTotal(ctx context.Context) (_ *DiskSpaceInfo, err error)
GetUsedStorageTotal returns all info about storagenode disk space usage
func (*Service) GetVersion ¶
GetVersion return current node version