satellite

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: AGPL-3.0 Imports: 49 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

	Dialer  rpc.Dialer
	Server  *server.Server
	Version *version.Service

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

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

	Vouchers struct {
		Endpoint *vouchers.Endpoint
	}

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

	Metainfo struct {
		Database  metainfo.PointerDB
		Service   *metainfo.Service
		Endpoint2 *metainfo.Endpoint
	}

	Inspector struct {
		Endpoint *inspector.Endpoint
	}

	Repair struct {
		Inspector *irreparable.Inspector
	}

	Accounting struct {
		ProjectUsage *accounting.ProjectUsage
	}

	LiveAccounting struct {
		Service live.Service
	}

	Mail struct {
		Service *mailservice.Service
	}

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

	Marketing struct {
		Listener net.Listener
		Endpoint *marketingweb.Server
	}

	NodeStats struct {
		Endpoint *nodestats.Endpoint
	}
}

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, revocationDB extensions.RevocationDB, config *APIConfig, versionInfo version.Info) (*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) Local added in v0.23.0

func (peer *API) Local() overlay.NodeDossier

Local returns the peer local node info.

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 APIConfig added in v0.23.0

type APIConfig struct {
	Identity identity.Config
	Server   server.Config
	Version  version.Config

	Contact contact.Config
	Overlay overlay.Config

	Metainfo metainfo.Config
	Orders   orders.Config

	Repairer repairer.Config

	Rollup         rollup.Config
	LiveAccounting live.Config

	Mail      mailservice.Config
	Console   consoleweb.Config
	Marketing marketingweb.Config
}

APIConfig is the global config for the satellite API process

type Config

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

	Contact   contact.Config
	Overlay   overlay.Config
	Discovery discovery.Config

	Metainfo metainfo.Config
	Orders   orders.Config

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

	GarbageCollection gc.Config

	DBCleanup dbcleanup.Config

	Tally          tally.Config
	Rollup         rollup.Config
	LiveAccounting live.Config

	Mail    mailservice.Config
	Console consoleweb.Config

	Marketing marketingweb.Config

	Version version.Config

	GracefulExit gracefulexit.Config
}

Config is the global config satellite

type DB

type DB interface {
	// CreateTables initializes the database
	CreateTables() error
	// Close closes the database
	Close() error

	// CreateSchema sets the schema
	CreateSchema(schema string) error
	// DropSchema drops the schema
	DropSchema(schema string) 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
	// Irreparable returns database for failed repairs
	Irreparable() irreparable.DB
	// Console returns database for satellite console
	Console() console.DB
	//  returns database for marketing admin GUI
	Rewards() rewards.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
}

DB is the master database for the satellite

architecture: Master Database

type Peer

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

	Dialer rpc.Dialer

	Server *server.Server

	Version *version.Service

	// services and endpoints
	Contact struct {
		Service   *contact.Service
		Endpoint  *contact.Endpoint
		KEndpoint *contact.KademliaEndpoint
	}

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

	Discovery struct {
		Service *discovery.Discovery
	}

	Metainfo struct {
		Database  metainfo.PointerDB // TODO: move into pointerDB
		Service   *metainfo.Service
		Endpoint2 *metainfo.Endpoint
		Loop      *metainfo.Loop
	}

	Inspector struct {
		Endpoint *inspector.Endpoint
	}

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

	Repair struct {
		Checker   *checker.Checker
		Repairer  *repairer.Service
		Inspector *irreparable.Inspector
	}
	Audit struct {
		Queue    *audit.Queue
		Worker   *audit.Worker
		Chore    *audit.Chore
		Verifier *audit.Verifier
		Reporter *audit.Reporter
	}

	GarbageCollection struct {
		Service *gc.Service
	}

	DBCleanup struct {
		Chore *dbcleanup.Chore
	}

	Accounting struct {
		Tally        *tally.Service
		Rollup       *rollup.Service
		ProjectUsage *accounting.ProjectUsage
	}

	LiveAccounting struct {
		Service live.Service
	}

	Mail struct {
		Service *mailservice.Service
	}

	Vouchers struct {
		Endpoint *vouchers.Endpoint
	}

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

	Marketing struct {
		Listener net.Listener
		Endpoint *marketingweb.Server
	}

	NodeStats struct {
		Endpoint *nodestats.Endpoint
	}

	GracefulExit struct {
		Chore *gracefulexit.Chore
	}
}

Peer is the satellite

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 satellite

func (*Peer) Addr

func (peer *Peer) Addr() string

Addr returns the public address.

func (*Peer) Close

func (peer *Peer) Close() error

Close closes all the resources.

func (*Peer) ID

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

ID returns the peer ID.

func (*Peer) Local

func (peer *Peer) Local() overlay.NodeDossier

Local returns the peer local node info.

func (*Peer) PrivateAddr

func (peer *Peer) PrivateAddr() string

PrivateAddr returns the private address.

func (*Peer) Run

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

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

func (*Peer) URL added in v0.15.0

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

URL returns the storj.NodeURL.

Directories

Path Synopsis
live
Package live provides live accounting functionality.
Package live provides live accounting functionality.
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.
dbx

Jump to

Keyboard shortcuts

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