Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Assets fs.FS = emptyfs.FS{}
Assets contains either the built admin/back-office/ui or it is nil.
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 operator.Config // TODO: flatten storage config and only keep the new one Storage piecestore.OldConfig Storage2 piecestore.Config Collector collector.Config Filestore filestore.Config Pieces pieces.Config Retain retain.Config Nodestats nodestats.Config Console consoleserver.Config Healthcheck healthcheck.Config Version snVersion.Config Bandwidth bandwidth.Config GracefulExit gracefulexit.Config ForgetSatellite forgetsatellite.Config }
Config is all the configuration parameters for a Storage Node.
func (*Config) DatabaseConfig ¶ added in v1.4.1
func (config *Config) DatabaseConfig() storagenodedb.Config
DatabaseConfig returns the storagenodedb.Config that should be used with this Config.
type DB ¶
type DB interface { // Config returns the configuration used to initialize the database. Config() storagenodedb.Config // MigrateToLatest initializes the database MigrateToLatest(ctx context.Context) error // Close closes the database Close() error Pieces() blobstore.Blobs Orders() orders.DB V0PieceInfo() pieces.V0PieceInfoDB PieceExpirationDB() pieces.PieceExpirationDB PieceSpaceUsedDB() pieces.PieceSpaceUsedDB Bandwidth() bandwidth.DB Reputation() reputation.DB StorageUsage() storageusage.DB Satellites() satellites.DB Notifications() notifications.DB Payout() payouts.DB Pricing() pricing.DB APIKeys() apikeys.DB GCFilewalkerProgress() pieces.GCFilewalkerProgressDB UsedSpacePerPrefix() pieces.UsedSpacePerPrefixDB Preflight(ctx context.Context) error }
DB is the master database for Storage Node.
architecture: Master Database
type Peer ¶
type Peer struct { // core dependencies Log *zap.Logger Identity *identity.FullIdentity DB DB UsedSerials *usedserials.Table OrdersStore *orders.FileStore Servers *lifecycle.Group Services *lifecycle.Group Dialer rpc.Dialer Server *server.Server Version struct { Chore *snVersion.Chore Service *checker.Service } Healthcheck struct { Service *healthcheck.Service Endpoint *healthcheck.Endpoint } Debug struct { Listener net.Listener Server *debug.Server Endpoint *debug.Endpoint } Preflight struct { LocalTime *preflight.LocalTime } Contact struct { Service *contact.Service Chore *contact.Chore Endpoint *contact.Endpoint PingStats *contact.PingStats QUICStats *contact.QUICStats } Estimation struct { Service *estimatedpayouts.Service } 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 PieceDeleter *pieces.Deleter Endpoint *piecestore.Endpoint Inspector *inspector.Endpoint Monitor *monitor.Service Orders *orders.Service FileWalker *pieces.FileWalker LazyFileWalker *lazyfilewalker.Supervisor } 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 { Service *gracefulexit.Service Endpoint *gracefulexit.Endpoint Chore *gracefulexit.Chore BlobsCleaner *gracefulexit.BlobsCleaner } ForgetSatellite struct { Endpoint *forgetsatellite.Endpoint Chore *forgetsatellite.Chore Cleaner *forgetsatellite.Cleaner } Notifications struct { Service *notifications.Service } Payout struct { Service *payouts.Service Endpoint *payouts.Endpoint } Bandwidth struct { Service *bandwidth.Service Cache *bandwidth.Cache } Reputation *reputation.Service Multinode struct { Storage *multinode.StorageEndpoint Bandwidth *multinode.BandwidthEndpoint Node *multinode.NodeEndpoint Payout *multinode.PayoutEndpoint } }
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, atomicLogLevel *zap.AtomicLevel) (*Peer, error)
New creates a new Storage Node.
func (*Peer) PrivateAddr ¶
PrivateAddr returns the private address.
Directories ¶
Path | Synopsis |
---|---|
Package bandwidth system keeps track of bandwidth usage as reported by order limits and orders.
|
Package bandwidth system keeps track of bandwidth usage as reported by order limits and orders. |
Package collector implements expired piece deletion from storage node.
|
Package collector implements expired piece deletion from storage node. |
Package inspector provides a private endpoint for monitoring status.
|
Package inspector provides a private endpoint for monitoring status. |
Package internalpb contains proto definitions for storagenode internal tools.
|
Package internalpb contains proto definitions for storagenode internal tools. |
Package monitor is responsible for monitoring the disk is well-behaved.
|
Package monitor is responsible for monitoring the disk is well-behaved. |
Package orders handles order limit management.
|
Package orders handles order limit management. |
Package pieces is responsible for the low level piece management.
|
Package pieces is responsible for the low level piece management. |
Package piecestore contains the endpoint for responding to requests from the uplinks and satellites.
|
Package piecestore contains the endpoint for responding to requests from the uplinks and satellites. |
Package trust handles rules for accepting and denying connections from satellites.
|
Package trust handles rules for accepting and denying connections from satellites. |
Click to show internal directories.
Click to hide internal directories.