multinode

package
v1.34.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: AGPL-3.0 Imports: 17 Imported by: 2

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
	Debug    debug.Config

	Console server.Config
}

Config is all the configuration parameters for a Multinode Dashboard.

type DB

type DB interface {
	// Nodes returns nodes database.
	Nodes() nodes.DB

	// MigrateToLatest initializes the database.
	MigrateToLatest(ctx context.Context) error
	// Close closes the database.
	Close() error
}

DB is the master database for Multinode Dashboard.

architecture: Master Database

type Peer

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

	Dialer rpc.Dialer

	// contains logic of nodes domain.
	Nodes struct {
		Service *nodes.Service
	}

	// contains logic of bandwidth domain.
	Bandwidth struct {
		Service *bandwidth.Service
	}

	// exposes operators related logic.
	Operators struct {
		Service *operators.Service
	}

	// contains logic of payouts domain.
	Payouts struct {
		Service *payouts.Service
	}

	Storage struct {
		Service *storage.Service
	}

	Reputation struct {
		Service *reputation.Service
	}

	// Web server with web UI.
	Console struct {
		Listener net.Listener
		Endpoint *server.Server
	}

	Servers *lifecycle.Group
}

Peer is the a Multinode Dashboard application itself.

architecture: Peer

func New

func New(log *zap.Logger, full *identity.FullIdentity, config Config, db DB) (_ *Peer, err error)

New creates a new instance of Multinode Dashboard application.

func (*Peer) Close

func (peer *Peer) Close() error

Close closes all the resources.

func (*Peer) Run

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

Run runs Multinode Dashboard services and servers until it's either closed or it errors.

Directories

Path Synopsis
console
dbx

Jump to

Keyboard shortcuts

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