satellite

package
v1.32.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: AGPL-3.0 Imports: 67 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.23.0

type API struct {
	Log      *zap.Logger
	Identity *identity.FullIdentity
	DB       DB

	Servers  *lifecycle.Group
	Services *lifecycle.Group

	Dialer          rpc.Dialer
	Server          *server.Server
	ExternalAddress string

	Version struct {
		Chore   *checker.Chore
		Service *checker.Service
	}

	Debug struct {
		Listener net.Listener
		Server   *debug.Server
	}

	Contact struct {
		Service  *contact.Service
		Endpoint *contact.Endpoint
	}

	Overlay struct {
		DB      overlay.DB
		Service *overlay.Service
	}

	Orders struct {
		DB       orders.DB
		Endpoint *orders.Endpoint
		Service  *orders.Service
		Chore    *orders.Chore
	}

	Metainfo struct {
		Metabase      *metabase.DB
		Service       *metainfo.Service
		PieceDeletion *piecedeletion.Service
		Endpoint2     *metainfo.Endpoint
	}

	Inspector struct {
		Endpoint *inspector.Endpoint
	}

	Accounting struct {
		ProjectUsage *accounting.Service
	}

	LiveAccounting struct {
		Cache accounting.Cache
	}

	ProjectLimits struct {
		Cache *accounting.ProjectLimitCache
	}

	Mail struct {
		Service *mailservice.Service
	}

	Payments struct {
		Accounts payments.Accounts
		Version  *stripecoinpayments.VersionService
		Service  *stripecoinpayments.Service
		Stripe   stripecoinpayments.StripeClient
	}

	Console struct {
		Listener net.Listener
		Service  *console.Service
		Endpoint *consoleweb.Server
	}

	Marketing struct {
		PartnersService *rewards.PartnersService
	}

	NodeStats struct {
		Endpoint *nodestats.Endpoint
	}

	SNOPayouts struct {
		Endpoint *snopayouts.Endpoint
		Service  *snopayouts.Service
		DB       snopayouts.DB
	}

	GracefulExit struct {
		Endpoint *gracefulexit.Endpoint
	}

	Analytics struct {
		Service *analytics.Service
	}
}

API is the satellite API process.

architecture: Peer

func NewAPI added in v0.23.0

func NewAPI(log *zap.Logger, full *identity.FullIdentity, db DB,
	metabaseDB *metabase.DB, revocationDB extensions.RevocationDB,
	liveAccounting accounting.Cache, rollupsWriteCache *orders.RollupsWriteCache,
	config *Config, versionInfo version.Info, atomicLogLevel *zap.AtomicLevel) (*API, error)

NewAPI creates a new satellite API process.

func (*API) Addr added in v0.23.0

func (peer *API) Addr() string

Addr returns the public address.

func (*API) Close added in v0.23.0

func (peer *API) Close() error

Close closes all the resources.

func (*API) ID added in v0.23.0

func (peer *API) ID() storj.NodeID

ID returns the peer ID.

func (*API) PrivateAddr added in v0.23.0

func (peer *API) PrivateAddr() string

PrivateAddr returns the private address.

func (*API) Run added in v0.23.0

func (peer *API) Run(ctx context.Context) (err error)

Run runs satellite until it's either closed or it errors.

func (*API) URL added in v0.23.0

func (peer *API) URL() storj.NodeURL

URL returns the storj.NodeURL.

type Admin added in v0.33.2

type Admin struct {
	// core dependencies
	Log      *zap.Logger
	Identity *identity.FullIdentity
	DB       DB

	Servers  *lifecycle.Group
	Services *lifecycle.Group

	Debug struct {
		Listener net.Listener
		Server   *debug.Server
	}

	Version struct {
		Chore   *checker.Chore
		Service *checker.Service
	}

	Payments struct {
		Accounts payments.Accounts
		Service  *stripecoinpayments.Service
		Stripe   stripecoinpayments.StripeClient
	}

	Admin struct {
		Listener net.Listener
		Server   *admin.Server
	}
}

Admin is the satellite core process that runs chores.

architecture: Peer

func NewAdmin added in v0.33.2

func NewAdmin(log *zap.Logger, full *identity.FullIdentity, db DB,
	versionInfo version.Info, config *Config, atomicLogLevel *zap.AtomicLevel) (*Admin, error)

NewAdmin creates a new satellite admin peer.

func (*Admin) Close added in v0.33.2

func (peer *Admin) Close() error

Close closes all the resources.

func (*Admin) ID added in v0.33.2

func (peer *Admin) ID() storj.NodeID

ID returns the peer ID.

func (*Admin) Run added in v0.33.2

func (peer *Admin) Run(ctx context.Context) (err error)

Run runs satellite until it's either closed or it errors.

type Config

type Config struct {
	Identity identity.Config
	Server   server.Config
	Debug    debug.Config

	Admin admin.Config

	Contact    contact.Config
	Overlay    overlay.Config
	StrayNodes straynodes.Config

	Metainfo metainfo.Config
	Orders   orders.Config

	Checker  checker.Config
	Repairer repairer.Config
	Audit    audit.Config

	GarbageCollection gc.Config

	ExpiredDeletion expireddeletion.Config

	Tally            tally.Config
	Rollup           rollup.Config
	RollupArchive    rolluparchive.Config
	LiveAccounting   live.Config
	ProjectBWCleanup projectbwcleanup.Config

	Mail mailservice.Config

	Payments paymentsconfig.Config

	Console consoleweb.Config

	Version version_checker.Config

	GracefulExit gracefulexit.Config

	Metrics metrics.Config

	Compensation compensation.Config

	ProjectLimit accounting.ProjectLimitConfig

	Analytics analytics.Config
}

Config is the global config satellite.

type Core added in v0.25.0

type Core struct {
	// core dependencies
	Log      *zap.Logger
	Identity *identity.FullIdentity
	DB       DB

	Servers  *lifecycle.Group
	Services *lifecycle.Group

	Dialer rpc.Dialer

	Version struct {
		Chore   *version_checker.Chore
		Service *version_checker.Service
	}

	Debug struct {
		Listener net.Listener
		Server   *debug.Server
	}

	// services and endpoints
	Overlay struct {
		DB           overlay.DB
		Service      *overlay.Service
		DQStrayNodes *straynodes.Chore
	}

	Metainfo struct {
		Metabase    *metabase.DB
		Service     *metainfo.Service
		Loop        *metaloop.Service
		SegmentLoop *segmentloop.Service
	}

	Orders struct {
		DB      orders.DB
		Service *orders.Service
		Chore   *orders.Chore
	}

	Repair struct {
		Checker *checker.Checker
	}

	Audit struct {
		Queues   *audit.Queues
		Worker   *audit.Worker
		Chore    *audit.Chore
		Verifier *audit.Verifier
		Reporter *audit.Reporter
	}

	ExpiredDeletion struct {
		Chore *expireddeletion.Chore
	}

	Accounting struct {
		Tally                 *tally.Service
		Rollup                *rollup.Service
		RollupArchiveChore    *rolluparchive.Chore
		ProjectBWCleanupChore *projectbwcleanup.Chore
	}

	LiveAccounting struct {
		Cache accounting.Cache
	}

	Payments struct {
		Accounts payments.Accounts
		Chore    *stripecoinpayments.Chore
	}

	GracefulExit struct {
		Chore *gracefulexit.Chore
	}

	Metrics struct {
		Chore *metrics.Chore
	}
}

Core is the satellite core process that runs chores.

architecture: Peer

func New

func New(log *zap.Logger, full *identity.FullIdentity, db DB,
	metabaseDB *metabase.DB, revocationDB extensions.RevocationDB,
	liveAccounting accounting.Cache, rollupsWriteCache *orders.RollupsWriteCache,
	versionInfo version.Info, config *Config, atomicLogLevel *zap.AtomicLevel) (*Core, error)

New creates a new satellite.

func (*Core) Close added in v0.25.0

func (peer *Core) Close() error

Close closes all the resources.

func (*Core) ID added in v0.25.0

func (peer *Core) ID() storj.NodeID

ID returns the peer ID.

func (*Core) Run added in v0.25.0

func (peer *Core) Run(ctx context.Context) (err error)

Run runs satellite until it's either closed or it errors.

type DB

type DB interface {
	// MigrateToLatest initializes the database
	MigrateToLatest(ctx context.Context) error
	// CheckVersion checks the database is the correct version
	CheckVersion(ctx context.Context) error
	// Close closes the database
	Close() error

	// TestingMigrateToLatest initializes the database for testplanet.
	TestingMigrateToLatest(ctx context.Context) error

	// PeerIdentities returns a storage for peer identities
	PeerIdentities() overlay.PeerIdentities
	// OverlayCache returns database for caching overlay information
	OverlayCache() overlay.DB
	// Attribution returns database for partner keys information
	Attribution() attribution.DB
	// StoragenodeAccounting returns database for storing information about storagenode use
	StoragenodeAccounting() accounting.StoragenodeAccounting
	// ProjectAccounting returns database for storing information about project data use
	ProjectAccounting() accounting.ProjectAccounting
	// RepairQueue returns queue for segments that need repairing
	RepairQueue() queue.RepairQueue
	// Console returns database for satellite console
	Console() console.DB
	// Orders returns database for orders
	Orders() orders.DB
	// Containment returns database for containment
	Containment() audit.Containment
	// Buckets returns the database to interact with buckets
	Buckets() metainfo.BucketsDB
	// GracefulExit returns database for graceful exit
	GracefulExit() gracefulexit.DB
	// StripeCoinPayments returns stripecoinpayments database.
	StripeCoinPayments() stripecoinpayments.DB
	// SnoPayout returns database for payouts.
	SNOPayouts() snopayouts.DB
	// Compoensation tracks storage node compensation
	Compensation() compensation.DB
	// Revocation tracks revoked macaroons
	Revocation() revocation.DB
	// NodeAPIVersion tracks nodes observed api usage
	NodeAPIVersion() nodeapiversion.DB
}

DB is the master database for the satellite.

architecture: Master Database

type GarbageCollection added in v1.1.1

type GarbageCollection struct {
	Log      *zap.Logger
	Identity *identity.FullIdentity
	DB       DB

	Servers  *lifecycle.Group
	Services *lifecycle.Group

	Dialer rpc.Dialer

	Version struct {
		Chore   *version_checker.Chore
		Service *version_checker.Service
	}

	Debug struct {
		Listener net.Listener
		Server   *debug.Server
	}

	Overlay struct {
		DB overlay.DB
	}

	Metainfo struct {
		SegmentLoop *segmentloop.Service
	}

	GarbageCollection struct {
		Service *gc.Service
	}
}

GarbageCollection is the satellite garbage collection process.

architecture: Peer

func NewGarbageCollection added in v1.1.1

func NewGarbageCollection(log *zap.Logger, full *identity.FullIdentity, db DB,
	metabaseDB *metabase.DB, revocationDB extensions.RevocationDB,
	versionInfo version.Info, config *Config, atomicLogLevel *zap.AtomicLevel) (*GarbageCollection, error)

NewGarbageCollection creates a new satellite garbage collection process.

func (*GarbageCollection) Close added in v1.1.1

func (peer *GarbageCollection) Close() error

Close closes all the resources.

func (*GarbageCollection) ID added in v1.1.1

func (peer *GarbageCollection) ID() storj.NodeID

ID returns the peer ID.

func (*GarbageCollection) Run added in v1.1.1

func (peer *GarbageCollection) Run(ctx context.Context) (err error)

Run runs satellite garbage collection until it's either closed or it errors.

type Repairer added in v0.25.0

type Repairer struct {
	Log      *zap.Logger
	Identity *identity.FullIdentity

	Servers  *lifecycle.Group
	Services *lifecycle.Group

	Dialer rpc.Dialer

	Version struct {
		Chore   *version_checker.Chore
		Service *version_checker.Service
	}

	Debug struct {
		Listener net.Listener
		Server   *debug.Server
	}

	Metainfo *metainfo.Service
	Overlay  *overlay.Service
	Orders   struct {
		DB      orders.DB
		Service *orders.Service
		Chore   *orders.Chore
	}
	SegmentRepairer *repairer.SegmentRepairer
	Repairer        *repairer.Service
}

Repairer is the repairer process.

architecture: Peer

func NewRepairer added in v0.25.0

func NewRepairer(log *zap.Logger, full *identity.FullIdentity,
	metabaseDB *metabase.DB,
	revocationDB extensions.RevocationDB, repairQueue queue.RepairQueue,
	bucketsDB metainfo.BucketsDB, overlayCache overlay.DB,
	rollupsWriteCache *orders.RollupsWriteCache,
	versionInfo version.Info, config *Config, atomicLogLevel *zap.AtomicLevel) (*Repairer, error)

NewRepairer creates a new repairer peer.

func (*Repairer) Close added in v0.25.0

func (peer *Repairer) Close() error

Close closes all the resources.

func (*Repairer) ID added in v0.25.0

func (peer *Repairer) ID() storj.NodeID

ID returns the peer ID.

func (*Repairer) Run added in v0.25.0

func (peer *Repairer) Run(ctx context.Context) (err error)

Run runs the repair process until it's either closed or it errors.

Directories

Path Synopsis
live
Package live provides live accounting functionality.
Package live provides live accounting functionality.
Package admin implements administrative endpoints for satellite.
Package admin implements administrative endpoints for satellite.
Package attribution implements value attribution from docs/design/value-attribution.md
Package attribution implements value attribution from docs/design/value-attribution.md
Package gc contains the functions needed to run garbage collection.
Package gc contains the functions needed to run garbage collection.
Package internalpb contains proto definitions for satellite internal tools.
Package internalpb contains proto definitions for satellite internal tools.
Package metabase implements storing objects and segements.
Package metabase implements storing objects and segements.
expireddeletion
Package expireddeletion contains the functions needed to run expired segment deletion The expireddeletion.expiredDeleter implements the metainfo loop Observer interface allowing us to subscribe to the loop to get information for every segment in the metainfo database.
Package expireddeletion contains the functions needed to run expired segment deletion The expireddeletion.expiredDeleter implements the metainfo loop Observer interface allowing us to subscribe to the loop to get information for every segment in the metainfo database.
piecedeletion
Package piecedeletion implements service for deleting pieces that combines concurrent requests.
Package piecedeletion implements service for deleting pieces that combines concurrent requests.
pointerverification
Package pointerverification implements verification of pointers.
Package pointerverification implements verification of pointers.
nodeselection
uploadselection
Package uploadselection implements node selection logic for uploads.
Package uploadselection implements node selection logic for uploads.
dbx

Jump to

Keyboard shortcuts

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