console

package
v0.14.8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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

func FromUsage

func FromUsage(usage *bandwidth.Usage, allocatedBandwidth int64) (*BandwidthInfo, error)

FromUsage used to create BandwidthInfo instance from Usage object

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

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

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 Ingress

type Ingress struct {
	Repair int64 `json:"repair"`
	Usage  int64 `json:"usage"`
}

Ingress stores info about storage node ingress 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

func (s *Service) CheckVersion(ctx context.Context) (err error)

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

func (s *Service) GetNodeID(ctx context.Context) storj.NodeID

GetNodeID return current node id

func (*Service) GetSatellites

func (s *Service) GetSatellites(ctx context.Context) (_ storj.NodeIDList, err error)

GetSatellites used to retrieve satellites list

func (*Service) GetUptime

func (s *Service) GetUptime(ctx context.Context) time.Duration

GetUptime return wallet number of node operator

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

func (s *Service) GetVersion(ctx context.Context) version.Info

GetVersion return current node version

func (*Service) GetWalletAddress

func (s *Service) GetWalletAddress(ctx context.Context) string

GetWalletAddress return wallet address of node operator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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