Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Identity identity.Config Server server.Config Debug debug.Config Preflight preflight.Config Contact contact.Config Operator OperatorConfig // TODO: flatten storage config and only keep the new one Storage piecestore.OldConfig Storage2 piecestore.Config Collector collector.Config Retain retain.Config Nodestats nodestats.Config Console consoleserver.Config Version checker.Config Bandwidth bandwidth.Config GracefulExit gracefulexit.Config }
Config is all the configuration parameters for a Storage Node.
type DB ¶
type DB interface { // CreateTables initializes the database CreateTables(ctx context.Context) error // Close closes the database Close() error Pieces() storage.Blobs Orders() orders.DB V0PieceInfo() pieces.V0PieceInfoDB PieceExpirationDB() pieces.PieceExpirationDB PieceSpaceUsedDB() pieces.PieceSpaceUsedDB Bandwidth() bandwidth.DB UsedSerials() piecestore.UsedSerials Reputation() reputation.DB StorageUsage() storageusage.DB Satellites() satellites.DB Notifications() notifications.DB HeldAmount() heldamount.DB Preflight(ctx context.Context) error }
DB is the master database for Storage Node
architecture: Master Database
type OperatorConfig ¶ added in v0.22.0
type OperatorConfig struct { Email string `user:"true" help:"operator email address" default:""` Wallet string `user:"true" help:"operator wallet address" default:""` }
OperatorConfig defines properties related to storage node operator metadata
type Peer ¶
type Peer struct { // core dependencies Log *zap.Logger Identity *identity.FullIdentity DB DB Servers *lifecycle.Group Services *lifecycle.Group Dialer rpc.Dialer Server *server.Server Version struct { Chore *version2.Chore Service *checker.Service } Debug struct { Listener net.Listener Server *debug.Server } Preflight struct { LocalTime *preflight.LocalTime } Contact struct { Service *contact.Service Chore *contact.Chore Endpoint *contact.Endpoint PingStats *contact.PingStats } Storage2 struct { // TODO: lift things outside of it to organize better Trust *trust.Pool Store *pieces.Store TrashChore *pieces.TrashChore BlobsCache *pieces.BlobsUsageCache CacheService *pieces.CacheService RetainService *retain.Service Endpoint *piecestore.Endpoint Inspector *inspector.Endpoint Monitor *monitor.Service Orders *orders.Service } Collector *collector.Service NodeStats struct { Service *nodestats.Service Cache *nodestats.Cache } // Web server with web UI Console struct { Listener net.Listener Service *console.Service Endpoint *consoleserver.Server } GracefulExit struct { Endpoint *gracefulexit.Endpoint Chore *gracefulexit.Chore } Notifications struct { Service *notifications.Service } Heldamount struct { Service *heldamount.Service } Bandwidth *bandwidth.Service }
Peer is the representation of a Storage Node.
architecture: Peer
func New ¶
func New(log *zap.Logger, full *identity.FullIdentity, db DB, revocationDB extensions.RevocationDB, config Config, versionInfo version.Info) (*Peer, error)
New creates a new Storage Node.
func (*Peer) Local ¶
func (peer *Peer) Local() overlay.NodeDossier
Local returns the peer local node info.
func (*Peer) PrivateAddr ¶
PrivateAddr returns the private address.
Directories ¶
Path | Synopsis |
---|---|
Package bandwidth implements bandwidth usage rollup loop.
|
Package bandwidth implements bandwidth usage rollup loop. |
Package collector implements expired piece deletion from storage node.
|
Package collector implements expired piece deletion from storage node. |
Click to show internal directories.
Click to hide internal directories.