multinode

package
v1.21.1-rc-multipart Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: AGPL-3.0 Imports: 13 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
	// Members returns members database.
	Members() console.Members

	// Close closes the database.
	Close() error
	// CreateSchema creates schema.
	CreateSchema(ctx context.Context) 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
	}

	// 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
dbx

Jump to

Keyboard shortcuts

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